Revision 25859,
1.2 KB
checked in by jdreed, 12 years ago
(diff) |
In auto-update:
* Actually, don't bother cleaning up the headers by hand. Instead, just
auto-remove packages (unless that would remove metapackages) for
compatibility with old aptitude-based updater. (Trac: #1012)
* Convert from CDBS to dh7 and build-dep on dh 7.0.50
* Update copyright file to format 1.0 and re-license under BSD 3-clause
* Bump Standards-Version to 3.9.3
* Remove unneeded dependency on bsdutils (it's required)
* Add $remote_fs dependency in init script because it's apparently still
1992 and /usr might be an NFS mount
|
Rev | Line | |
---|
[24935] | 1 | #!/bin/sh |
---|
| 2 | # |
---|
| 3 | ### BEGIN INIT INFO |
---|
| 4 | # Provides: debathena-auto-update |
---|
[25859] | 5 | # Required-Start: $network $local_fs $remote_fs |
---|
| 6 | # Required-Stop: $network $local_fs $remote_fs |
---|
[24935] | 7 | # Default-Start: 2 3 4 5 |
---|
[25050] | 8 | # Default-Stop: 0 1 6 |
---|
[24935] | 9 | # Short-Description: Run an update at boot time |
---|
| 10 | # Description: Run an update at boot time |
---|
| 11 | ### END INIT INFO |
---|
| 12 | # |
---|
| 13 | # This script is part of the debathena-auto-update package |
---|
| 14 | # See /usr/share/doc/debathena-auto-update/copyright |
---|
| 15 | |
---|
| 16 | machtype -v -L | grep -q "debathena-cluster" || exit 0 |
---|
| 17 | |
---|
[24962] | 18 | . /lib/lsb/init-functions |
---|
| 19 | |
---|
[24935] | 20 | case "$1" in |
---|
| 21 | start) |
---|
| 22 | if [ -f /var/lib/athena-update-status ]; then |
---|
| 23 | updlast=$(awk -F\| '{print $2;}' /var/lib/athena-update-status) |
---|
| 24 | time=$(date +%s) |
---|
| 25 | if echo $updlast | grep -q ^[0-9]*$; then |
---|
| 26 | elapsed=`echo $time - $updlast | bc` |
---|
[24962] | 27 | if [ $elapsed -lt 86400 ]; then |
---|
[24935] | 28 | exit 0 |
---|
| 29 | fi |
---|
| 30 | fi |
---|
| 31 | fi |
---|
[24962] | 32 | log_action_msg "Workstation has not checked for an update in 24 hours" |
---|
| 33 | log_action_msg "Forcing an update now (this can take up to 15 minutes)" |
---|
| 34 | if /usr/sbin/athena-auto-update; then |
---|
| 35 | log_end_msg 0 |
---|
| 36 | else |
---|
| 37 | log_end_msg 1 |
---|
| 38 | fi |
---|
[24935] | 39 | ;; |
---|
[24962] | 40 | stop|restart|reload|force-reload|status) |
---|
| 41 | exit 0 |
---|
| 42 | ;; |
---|
| 43 | *) |
---|
| 44 | log_action_msg "Usage: /etc/init.d/debathena-auto-update {start}" |
---|
| 45 | exit 1 |
---|
| 46 | ;; |
---|
[24935] | 47 | esac |
---|
[24962] | 48 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.