Revision 25268,
1.0 KB
checked in by jdreed, 13 years ago
(diff) |
Create a flag file while we're adding the printers at boot time
|
Line | |
---|
1 | #! /bin/sh |
---|
2 | |
---|
3 | ### BEGIN INIT INFO |
---|
4 | # Provides: debathena-cluster-cups-config |
---|
5 | # Required-Start: cups $remote_fs |
---|
6 | # Required-Stop: cups $remote_fs |
---|
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" |
---|
20 | touch /var/run/debathena-adding-printers |
---|
21 | if /usr/share/debathena-cluster-cups-config/configure-athena-printers add; then |
---|
22 | rm -f /var/lib/debathena-cluster-cups-config-reconfigure_required |
---|
23 | log_end_msg 0 |
---|
24 | else |
---|
25 | log_end_msg 1 |
---|
26 | fi |
---|
27 | rm /var/run/debathena-adding-printers |
---|
28 | fi |
---|
29 | ;; |
---|
30 | stop|restart|reload|force-reload|status) |
---|
31 | exit 0 |
---|
32 | ;; |
---|
33 | *) |
---|
34 | log_action_msg "Usage: /etc/init.d/debathena-cluster-cups-config {start}" |
---|
35 | exit 1 |
---|
36 | ;; |
---|
37 | esac |
---|
38 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.