1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
#!/bin/bash
# Author: Steven Shiau <steven _at_ clonezilla org>
# License: GPL
### BEGIN INIT INFO
# Provides: stop-ocs-live
# Required-Start: $local_fs $all
# Required-Stop:
# X-Start-Before:
# Default-Start:
# Default-Stop: 0 6
### END INIT INFO
# To avoid there is no input output in rc running, we add this one:
exec </dev/console >/dev/console 2>&1
[ ! -d "/etc/ocs/ocs-live.d/" ] && exit 1
[ -z "$(ls /etc/ocs/ocs-live.d/K[0-9][0-9]* 2>/dev/null)" ] && exit 1
for script in /etc/ocs/ocs-live.d/K[0-9][0-9]*; do
$script
done
|