- add autofs_ldap_auth.conf man page. - fix random selection for host on different network. - make redhat init script more lsb compliant. - don't hold lock for simple mounts. - fix remount locking. - fix wildcard map entry match. - fix parse_sun() module init. - dont check null cache on expire. - fix null cache race. - fix cache_init() on source re-read. - fix mapent becomes negative during lookup. - check each dc server individually. - fix negative cache included map lookup. - remove state machine timed wait.
113 lines
2.3 KiB
Diff
113 lines
2.3 KiB
Diff
autofs-5.0.5 - make redhat init script more lsb compliant
|
|
|
|
From: Ian Kent <raven@themaw.net>
|
|
|
|
|
|
---
|
|
|
|
CHANGELOG | 1 +
|
|
redhat/autofs.init.in | 39 ++++++++++++++++++++++++++++++++-------
|
|
2 files changed, 33 insertions(+), 7 deletions(-)
|
|
|
|
|
|
--- autofs-5.0.5.orig/CHANGELOG
|
|
+++ autofs-5.0.5/CHANGELOG
|
|
@@ -31,6 +31,7 @@
|
|
- fix master map source server unavailable handling.
|
|
- add autofs_ldap_auth.conf man page.
|
|
- fix random selection for host on different network.
|
|
+- make redhat init script more lsb compliant.
|
|
|
|
03/09/2009 autofs-5.0.5
|
|
-----------------------
|
|
--- autofs-5.0.5.orig/redhat/autofs.init.in
|
|
+++ autofs-5.0.5/redhat/autofs.init.in
|
|
@@ -86,14 +86,18 @@ function start() {
|
|
fi
|
|
|
|
echo -n $"Starting $prog: "
|
|
- $prog $OPTIONS
|
|
+ $prog $OPTIONS --pid-file /var/run/autofs.pid
|
|
RETVAL=$?
|
|
if [ $RETVAL -eq 0 ] ; then
|
|
success "$prog startup"
|
|
else
|
|
failure "$prog startup"
|
|
fi
|
|
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/autofs
|
|
+ if [ $RETVAL -eq 0 ]; then
|
|
+ touch /var/lock/subsys/autofs
|
|
+ else
|
|
+ RETVAL=1
|
|
+ fi
|
|
echo
|
|
return $RETVAL
|
|
}
|
|
@@ -107,7 +111,11 @@ function stop() {
|
|
[ $RETVAL = 0 -a -z "`pidof $prog`" ] || sleep 3
|
|
count=`expr $count + 1`
|
|
done
|
|
- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/autofs
|
|
+ if [ $RETVAL -eq 0 ]; then
|
|
+ rm -f /var/lock/subsys/autofs
|
|
+ else
|
|
+ RETVAL=1
|
|
+ fi
|
|
if [ -n "`pidof $prog`" ] ; then
|
|
failure "$prog shutdown"
|
|
else
|
|
@@ -118,7 +126,10 @@ function stop() {
|
|
}
|
|
|
|
function restart() {
|
|
- stop
|
|
+ status > /dev/null 2>&1
|
|
+ if [ $? -eq 0 ]; then
|
|
+ stop
|
|
+ fi
|
|
start
|
|
}
|
|
|
|
@@ -142,6 +153,12 @@ function reload() {
|
|
|
|
RETVAL=0
|
|
|
|
+# Only the root user may change the service status
|
|
+if [ `id -u` -ne 0 ]; then
|
|
+ echo "insufficient privilege to change service status"
|
|
+ exit 4
|
|
+fi
|
|
+
|
|
case "$1" in
|
|
start)
|
|
start
|
|
@@ -154,7 +171,7 @@ case "$1" in
|
|
stop
|
|
;;
|
|
status)
|
|
- status $prog
|
|
+ status -p /var/run/autofs.pid -l autofs $prog
|
|
;;
|
|
restart)
|
|
restart
|
|
@@ -171,9 +188,17 @@ case "$1" in
|
|
restart
|
|
fi
|
|
;;
|
|
- *)
|
|
+ usage)
|
|
echo $"Usage: $0 {start|forcestart|stop|status|restart|forcerestart|reload|condrestart}"
|
|
- exit 1;
|
|
+ exit 0
|
|
+ ;;
|
|
+ try-restart|force-reload)
|
|
+ echo "$1 service action not supported"
|
|
+ exit 3
|
|
+ ;;
|
|
+ *)
|
|
+ echo "unknown, invalid or excess argument(s)"
|
|
+ exit 2
|
|
;;
|
|
esac
|
|
|