update-rc.d não aceita o cabeçalho de um arquivo de script

1

Eu tenho o beagleBoard e quero iniciar meu script no momento da inicialização (boot / reboot). Então, eu corri o comando: update-rc.d GatewayStart.sh padrões

Saída que diz: o cabeçalho é rejeitado

    root@beaglebone:/etc/init.d# update-rc.d GatewayStart.sh defaults
    update-rc.d: using dependency based boot sequencing
    insserv: warning: script 'S18led_aging' missing LSB tags and overrides
    insserv: warning: script 'led_aging.sh' missing LSB tags and overrides
    insserv: There is a loop between service rmnologin and mountnfs if started
    insserv:  loop involving service mountnfs at depth 9
    insserv:  loop involving service networking at depth 8
    insserv: There is a loop between service led_aging and mountall if started
    insserv:  loop involving service mountall at depth 7
    insserv:  loop involving service checkfs at depth 6
    insserv:  loop involving service kbd at depth 8
    insserv: There is a loop between service led_aging and mountall-bootclean if started
    insserv:  loop involving service mountall-bootclean at depth 8
    insserv: There is a loop at service rmnologin if started
    insserv: There is a loop between service rmnologin and mountnfs-bootclean if started
    insserv:  loop involving service mountnfs-bootclean at depth 8
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Max recursions depth 99 reached
    insserv:  loop involving service saned at depth 1
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system 
facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv:  loop involving service urandom at depth 10
    insserv: There is a loop at service led_aging if started
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: Starting led_aging.sh depends on rmnologin and therefore on system facility '$all' which can not be true!
    insserv: exiting now without changing boot order!
    update-rc.d: error: insserv rejected the script header

Copiei o cabeçalho de outro script e alterei o nome em Fornece tags . Meu script é:

#!/bin/bash
### BEGIN INIT INFO
# Provides:          GatewayStart.sh
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO
HOME="/home/debian"
{
export PATH="$PATH:$HOME/Gateway/usr/lib/jvm/jdk-7-oracle-armhf/bin"
#tar -zxvf jdk-7-oracle-armhf.tar.gz
echo $PATH
export JAVA_HOME="$HOME/Gateway/usr/lib/jvm/jdk-7-oracle-armhf"


case $1 in

stop)
echo "in stop"
$HOME/Gateway/apache-karaf-3.0.2/bin/stop
echo " stop done"
;; # case start end

*)
echo "start or default runs"
$JAVA_HOME/db/bin/stopNetworkServer&
sleep 15
echo "stopped derby"
$JAVA_HOME/db/bin/startNetworkServer&
db_count=0
while [ $db_count -ne 1 ]
do
   echo "derby is not started yet"
sleep 10
db_count="$($HOME/Gateway/usr/lib/jvm/jdk-7-oracle-armhf/db/bin/ij $HOME/Gateway/scripts.sql | grep -c selected)"
   echo $db_count
done
echo "                          DB started                                      "
echo "**********************************************************************************"
echo "                          Bringing UP GATEWAY                                     "
echo "**********************************************************************************"
echo $HOME

$HOME/Gateway/IPUUartInterface/build/UDP_UART "127.0.0.1" 30005 "127.0.0.1" 30004 /dev/ttyUSB0 4 x&
echo "command for UPD_UART ran"

$HOME/Gateway/apache-karaf-3.0.2/bin/stop
echo "if any previous instance is running , it is stopped"

$HOME/Gateway/apache-karaf-3.0.2/bin/start

sleep 20
a=1
b=1
while [ $b -lt 8 ] && [ $a -lt 9 ]
do
   echo $a
sleep 80
a="$($HOME/Gateway/apache-karaf-3.0.2/bin/client -a 8101 -h 127.0.0.1 -u karaf bundle:list | grep -c Active)"
   echo "now"
   echo $a
b=$((b+1))
done


echo "while loop is over"

if [ $a -ne 9 ]
then
    echo "karaf needs manual interruption"
    exit 0
fi


echo "***********************************************************************************"
echo "                          Karaf is Running...                                      "
echo "*********************************************************************************"

esac

exit 0

} >> $HOME/Reboot_log.txt
    
por HimanshuR 27.04.2015 / 08:50

3 respostas

1

Quando eu procurei por esse erro no google. Isso me deu duas opções:

a) Flash Board com a imagem mais recente b) Substitua um script led_aging.sh por um script fornecido em googlegroups e blogs.

Então, eu tentei a segunda opção primeiro e funcionou. Eu não tenho idéia, qual é o propósito de led_aging.sh

O led_aging.sh real é:

> #!/bin/sh
> # tary, 16:46 2013-4-22
> 
> x=$(/bin/ps -ef | /bin/grep "[l]ed_acc") if [ ! -n "$x" -a -x
> /usr/bin/led_acc ]; then  /usr/bin/led_acc & fi

Novo led_aging.sh é:

> #!/bin/sh -e  
> ### BEGIN INIT INFO  
> # Provides: led_aging.sh  
> # Required-Start: $local_fs  
> # Required-Stop: $local_fs  
> # Default-Start: 2 3 4 5  
> # Default-Stop: 0 1 6  
> # Short-Description: Start LED aging  
> # Description: Starts LED aging (whatever that is)  
> ### END INIT INFO

> x=$(/bin/ps -ef | /bin/grep "[l]ed_acc")   if [ ! -n "$x" -a -x
> /usr/bin/led_acc ]; then     /usr/bin/led_acc &   fi
    
por 27.04.2015 / 14:51
0

tente isso

Antes :::::::::::::::::::

#!/bin/bash
### BEGIN INIT INFO
# Provides:          GatewayStart.sh
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO

:::::::::::::::::::::::::

Depois de ########################

#!/bin/bash
#
 GatewayStart init script

### BEGIN INIT INFO
# Provides:          GatewayStart.sh
# Required-Start:    $local_fs
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO

todas as linhas aqui são comentadas com #

Eu não sei porque está removendo este # desde o início de algumas linhas.

#     
por 27.04.2015 / 10:55
0

Seu problema é com um arquivo completamente diferente. É nomeado nas muitas mensagens de erro que estão bem na sua frente: led_aging.sh .

Não tem cabeçalhos LSB adequados. Várias pessoas na WWW forneceram versões que possuem:

por 27.04.2015 / 15:01