Source: autofs5
Version: 5.0.4-3.2
Severity: wishlist
Tags: patch
Here is a patch to add support for the "status" action to the init.d
script of autofs5.
diff -u autofs5-5.0.4/debian/control autofs5-5.0.4/debian/control
--- autofs5-5.0.4/debian/control
+++ autofs5-5.0.4/debian/control
@@ -8,7 +8,7 @@
Package: autofs5
Architecture: any
-Depends: ${shlibs:Depends}, ucf
+Depends: ${shlibs:Depends}, ucf, lsb-base
Provides: autofs
Conflicts: autofs
Replaces: autofs
diff -u autofs5-5.0.4/debian/changelog autofs5-5.0.4/debian/changelog
--- autofs5-5.0.4/debian/changelog
+++ autofs5-5.0.4/debian/changelog
@@ -1,3 +1,9 @@
+autofs5 (5.0.4-3.3) UNRELEASED; urgency=low
+
+ * Add support for "status" action to init.d script
+
+ -- Peter Eisentraut <[email protected]> Tue, 13 Dec 2011 20:58:08 +0200
+
autofs5 (5.0.4-3.2) unstable; urgency=low
* Non-maintainer upload.
diff -u autofs5-5.0.4/debian/patches/10lsb_initscript.dpatch autofs5-5.0.4/debian/patches/10lsb_initscript.dpatch
--- autofs5-5.0.4/debian/patches/10lsb_initscript.dpatch
+++ autofs5-5.0.4/debian/patches/10lsb_initscript.dpatch
@@ -6,8 +6,9 @@
## DP: invoking the binary manually.
@DPATCH@
---- autofs5-5.0.4.orig/samples/rc.autofs.in 2009-03-11 21:21:51.517895474 +0100
-+++ autofs5-5.0.4/samples/rc.autofs.in 2009-03-11 21:30:02.804892695 +0100
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' autofs5-5.0.4~/samples/rc.autofs.in autofs5-5.0.4/samples/rc.autofs.in
+--- autofs5-5.0.4~/samples/rc.autofs.in 2011-12-13 19:32:34.000000000 +0200
++++ autofs5-5.0.4/samples/rc.autofs.in 2011-12-13 19:34:15.000000000 +0200
@@ -7,11 +7,13 @@
#
#
@@ -27,7 +28,16 @@
# Short-Description: Automounts filesystems on demand
# Description: Automounts filesystems on demand
### END INIT INFO
-@@ -75,28 +82,29 @@
+@@ -29,6 +31,8 @@
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+ export PATH
+
++. /lib/lsb/init-functions
++
+ #
+ # load customized configuation settings
+ #
+@@ -75,28 +79,29 @@
fi
fi
@@ -63,7 +73,18 @@
echo "failed."
fi
return $RETVAL
-@@ -133,7 +141,7 @@
+@@ -120,6 +125,10 @@
+ return $RETVAL
+ }
+
++function status() {
++ status_of_proc "$DAEMON" "$prog"
++}
++
+ RETVAL=0
+
+ case "$1" in
+@@ -133,7 +142,7 @@
stop)
stop
;;
@@ -72,12 +93,16 @@
restart
;;
forcerestart)
-@@ -144,7 +152,7 @@
+@@ -143,8 +152,11 @@
+ reload)
reload
;;
++ status)
++ status
++ ;;
*)
- echo $"Usage: $0 {start|forcestart|stop|restart|forcerestart|reload}"
-+ echo $"Usage: $0 {start|forcestart|stop|restart|forcerestart|reload|force-reload}"
++ echo $"Usage: $0 {start|forcestart|stop|restart|forcerestart|reload|force-reload|status}"
exit 1;
;;
esac