Portál AbcLinuxu, 12. května 2025 05:58
#! /bin/sh
case "$1" in
start)
echo "Starting oscam"
oscam -b -c /usr/local/etc/
;;
restart)
echo "Restart oscam"
killall oscam
sleep 1
oscam -b -c /usr/local/etc/
;;
stop)
echo "Stop oscam"
killall oscam
;;
*)
echo "Usage: /etc/init.d/oscam {start|restart|stop}"
exit 1
;;
esac
exit 0
/etc/init.d/
. Binárku som OSCAmu som vložil do /bin/
update-rc.d oscam defaults
root@server:~# update-rc.d oscam defaults
update-rc.d: using dependency based boot sequencing
insserv: warning: script 'oscam' missing LSB tags and overrides
insserv: There is a loop between service mediatomb and oscam if stopped
insserv: loop involving service oscam at depth 2
insserv: loop involving service mediatomb at depth 1
insserv: Stopping oscam depends on mediatomb 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
Řešení dotazu:
insserv: warning: script 'X' missing LSB tags and overrides
The /etc/init.d/X script is lacking the LSB fields. Adding them to the script header or as a override file in /etc/insserv/overrides/X would solve it.
Doporučoval bych řešit spíš „Spustenie oprgramu po starte - Fedora“ nebo „Spustenie oprgramu po starte - Arch“. Rozbité distribuce typu Debian jsou tak jedině k vzteku.
Skús spustiť vytváranie symlinkov cez tento príkaz update-rc.d oscam defaults 99
<. Predpokladám, že oscam sa spusti pred mediatomb a to robí slučku v spušťaní.
### BEGIN INIT INFO
# Provides: oscam
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start script for OSCAM
# Description: bla bla bla...
### END INIT INFO
#
# description: OSCAM
#
update-rc.d potřebuje pár informací, aby mohl sestavit správné pořádí pro startu...
P.S. Andrej: to, že Debian nepoužívá systemd neznamená, že je rozbitý. K vzteku jsou odpovědi jako je Tvoje.
### BEGIN INIT INFO # Provides: oscam # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start script for OSCAM # Description: bla bla bla... ### END INIT INFO # # description: OSCAM #
emissary@server:/etc/init.d$ sudo update-rc.d oscam defaults
update-rc.d: using dependency based boot sequencing
aptitude install checkinstallneptej se me proc, ted jsem se probudil.
Označujem ako vyriešené.
Na položenie ďalšej otázky je nutné vytvoriť ďalšiu otázku.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.