I'm running Rasbpian on my Pi, and I have a script in /etc/rc0.d (or more precisely, a symlink to /etc/init.d/myscript.sh) that does some GPIO output to notify the user that power can be shut off.
If I run sudo shutdown -h now, the script runs, and the system goes down.
If I run sudo shutdown now, the script does not run, but the system goes down.
I cannot find any documentation that states what should really happen when running shutdown now with no other arguments.
What difference does the -h make in this case? Does running shutdown now really not invoke runlevel 0?
Update: I found this doc (unixhelp.ed.ac.uk), saying that the default behaviour with no arguments is to go to runlevel 1. But I have a script in /etc/rc1.d, too, that does not run on shutdown.
Aucun commentaire:
Enregistrer un commentaire