나는 beagleBoard를 가지고 있고 부팅 시(시작/다시 시작) 스크립트를 시작하고 싶습니다. 그래서 다음 명령을 실행했습니다. update-rc.d GatewayStart.sh defaults
출력에는 다음이 표시됩니다. 헤더가 거부되었습니다.
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
다른 스크립트의 헤더를 복사하고 제공된 태그의 이름을 변경했습니다.. 내 스크립트는 다음과 같습니다
#!/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
답변1
구글에서 검색해보니 이런 오류가 나오네요. 두 가지 옵션이 제공됩니다.
a) 플래시 보드의 최신 이미지를 사용합니다. b) led_aging.sh 스크립트를 googlegroups 및 블로그에 제공된 스크립트로 바꿉니다.
그래서 두 번째 옵션을 먼저 시도했는데 효과가 있었습니다. led_aging.sh의 목적이 무엇인지 모르겠습니다.
실제 led_aging.sh는 다음과 같습니다.
> #!/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
새로운 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
답변2
이 시도
앞으로:::::::::::::::::::
#!/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
::::::::::::::::::::::::::::
뒤쪽에########################
#!/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
여기의 모든 줄은 #으로 주석 처리되어 있습니다.
일부 줄의 시작 부분에서 이 #이 제거되는 이유를 모르겠습니다.
#답변3
문제는 완전히 다른 파일에 있습니다. 이는 다음과 같은 많은 오류 메시지에 이름이 지정되어 있습니다 led_aging.sh
.
올바른 LSB 헤더가 없습니다. WWW의 일부 사람들은 다음 기능을 갖춘 버전을 제공합니다.