samedi 29 novembre 2014

Why does my script does not run in runlevel 0?


I made a script with following LSB header



#! /bin/sh
### BEGIN INIT INFO
# Provides: updateservice
# Required-Start: $local_fs $time $network $named $syslog
# Required-Stop: $local_fs $time $network $named $syslog
# Default-Start:
# Default-Stop: 0
# Short-Description: Update Service
# Description: This script is meant to update and upgrade
# the system. It uses apt-get.
### END INIT INFO


placed it in /etc/init.d and created the links with update-rc.d and got the one I wanted to have



lrwxrwxrwx 1 root root 19 Nov 29 13:08 /etc/rc0.d/K01update.sh -> ../init.d/update.sh


.... but: The script ist not executed at shutdown. Why?


Running /etc/init.d/update.sh stop manuallly does exactly what I want, but it's not executed when shutting down. And, just as a fun fact, same script and configuration on a raspberry pi works just as expected.


You guys are the experts... anybody any idea?


PS: uname -a output:



Linux d3bi4n 3.16.0-4-amd64 #1 SMP Debian 3.16.7-2 (2014-11-06) x86_64 GNU/Linux


Aucun commentaire:

Enregistrer un commentaire