Revision 25269,
1.1 KB
checked in by jdreed, 13 years ago
(diff) |
Abuse /var/run/athena-nologin to indicate that we're busy
|
Rev | Line | |
---|
[25262] | 1 | #! /bin/sh |
---|
| 2 | |
---|
| 3 | ### BEGIN INIT INFO |
---|
| 4 | # Provides: debathena-cluster-cups-config |
---|
[25266] | 5 | # Required-Start: cups $remote_fs |
---|
| 6 | # Required-Stop: cups $remote_fs |
---|
[25262] | 7 | # Should-Start: $local_fs $network |
---|
| 8 | # Default-Start: 2 3 4 5 |
---|
| 9 | # Default-Stop: 0 1 6 |
---|
| 10 | # Short-Description: Cluster CUPS configuration |
---|
| 11 | # Description: Ensure cluster printers exist |
---|
| 12 | ### END INIT INFO |
---|
| 13 | |
---|
| 14 | . /lib/lsb/init-functions |
---|
| 15 | |
---|
| 16 | case "$1" in |
---|
| 17 | start) |
---|
| 18 | if [ -f /var/lib/debathena-cluster-cups-config-reconfigure_required ]; then |
---|
| 19 | log_action_msg "Adding cluster printers" |
---|
[25269] | 20 | nologin=0 |
---|
| 21 | if [ ! -f /var/run/athena-nologin ]; then |
---|
| 22 | touch /var/run/athena-nologin |
---|
| 23 | nologin=1 |
---|
| 24 | fi |
---|
[25262] | 25 | if /usr/share/debathena-cluster-cups-config/configure-athena-printers add; then |
---|
[25263] | 26 | rm -f /var/lib/debathena-cluster-cups-config-reconfigure_required |
---|
[25262] | 27 | log_end_msg 0 |
---|
| 28 | else |
---|
| 29 | log_end_msg 1 |
---|
| 30 | fi |
---|
[25269] | 31 | [ $nologin -eq 1 ] && rm /var/run/athena-nologin |
---|
[25262] | 32 | fi |
---|
| 33 | ;; |
---|
| 34 | stop|restart|reload|force-reload|status) |
---|
| 35 | exit 0 |
---|
| 36 | ;; |
---|
| 37 | *) |
---|
| 38 | log_action_msg "Usage: /etc/init.d/debathena-cluster-cups-config {start}" |
---|
| 39 | exit 1 |
---|
| 40 | ;; |
---|
| 41 | esac |
---|
| 42 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.