rpms/autodir/devel autodir-0.99.9-noskeldirmodforce.patch, NONE, 1.1 autodir.spec, 1.6, 1.7 autogroup.init, 1.2, 1.3 autohome.init, 1.2, 1.3

Matthias Saou thias at fedoraproject.org
Sat Apr 11 11:32:29 UTC 2009


Author: thias

Update of /cvs/extras/rpms/autodir/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28053

Modified Files:
	autodir.spec autogroup.init autohome.init 
Added Files:
	autodir-0.99.9-noskeldirmodforce.patch 
Log Message:
Finish updating init scripts (#246873).


autodir-0.99.9-noskeldirmodforce.patch:

--- NEW FILE autodir-0.99.9-noskeldirmodforce.patch ---
diff -Naupr autodir-0.99.9.orig/src/modules/autohome.c autodir-0.99.9/src/modules/autohome.c
--- autodir-0.99.9.orig/src/modules/autohome.c	2007-04-10 06:49:51.000000000 +0200
+++ autodir-0.99.9/src/modules/autohome.c	2008-09-18 17:04:02.000000000 +0200
@@ -629,7 +629,7 @@ static int copy_skel_dir( const char *sr
 		}
 		else if( S_ISDIR( sdent_st.st_mode ) )
 		{
-			if( mkdir( ddent, sdent_st.st_mode & S_IRWXU ) == -1 )
+			if( mkdir( ddent, sdent_st.st_mode ) == -1 )
 			{
 				if( errno == EEXIST )
 				{


Index: autodir.spec
===================================================================
RCS file: /cvs/extras/rpms/autodir/devel/autodir.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- autodir.spec	24 Feb 2009 03:20:31 -0000	1.6
+++ autodir.spec	11 Apr 2009 11:31:57 -0000	1.7
@@ -1,7 +1,7 @@
 Summary: Creates user directories on demand
 Name: autodir
 Version: 0.99.9
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPLv2+
 Group: System Environment/Daemons
 URL: http://www.intraperson.com/autodir/
@@ -12,6 +12,7 @@
 Source4: autohome.sysconfig
 Patch0: autodir-0.96.0-cflags.patch
 Patch1: autodir-0.99.8-auto_fs4.patch
+Patch2: autodir-0.99.9-noskeldirmodforce.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Requires(post): /sbin/chkconfig
 Requires(preun): /sbin/service, /sbin/chkconfig
@@ -28,6 +29,7 @@
 %setup -q
 %patch0 -p1 -b .cflags
 %patch1 -p1 -b .auto_fs4
+%patch2 -p1 -b .noskeldirmodforce
 
 
 %build
@@ -92,13 +94,19 @@
 
 
 %changelog
-* Mon Feb 23 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.99.9-7
+* Sat Apr 11 2009 Matthias Saou <http://freshrpms.net/> 0.99.9-8
+- Finish updating init scripts (#246873).
+
+* Mon Feb 23 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> 
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 
 * Sun Nov 30 2008 Caolán McNamara <caolanm at redhat.com> - 0.99.9-6
 - rebuild for dependencies
 
-* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 0.99.9-5
+* Thu Sep 18 2008 Matthias Saou <http://freshrpms.net/> 0.99.9-6
+- Include patch to remove forced mode 700 on dirs installed from skel.
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org>
 - Autorebuild for GCC 4.3
 
 * Wed Aug 22 2007 Matthias Saou <http://freshrpms.net/> 0.99.9-4


Index: autogroup.init
===================================================================
RCS file: /cvs/extras/rpms/autodir/devel/autogroup.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- autogroup.init	22 Aug 2007 12:38:41 -0000	1.2
+++ autogroup.init	11 Apr 2009 11:31:57 -0000	1.3
@@ -1,104 +1,115 @@
 #!/bin/sh
+#
+# autogroup Creates user home directories on demand
+#
 # chkconfig: - 29 71
-# description: Creates user group directories on demand
+# description: Autohome creates user home directories in a transparent \
+#              manner. It relies on the autofs protocol for its operation.
 
 ### BEGIN INIT INFO
 # Provides: autogroup
 # Required-Start: $local_fs
 # Required-Stop: $local_fs
-# Short-Description: Creates group home directories on demand
-# Description: Autogroup creates group home directories in a transparent manner.
-#       It relies on the autofs protocol for its operation.
+# Should-Start: autohome
+# Should-Stop: autohome
+# Default-Start: 
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: Creates user home directories on demand
+# Description: Autohome creates user home directories in a transparent manner.
+#    It relies on the autofs protocol for its operation.
 ### END INIT INFO
 
 # Source function library.
 . /etc/init.d/functions
 
-# Source configuration
-. /etc/sysconfig/autogroup
+exec="/usr/sbin/autodir"
+prog="autogroup"
 
-prog=autogroup
-RETVAL=0
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
 
-start() {
+lockfile=/var/lock/subsys/$prog
 
-	# If autofs old module is loaded unload it now
-	grep -q -w autofs /proc/modules || \
-		/sbin/rmmod autofs &>/dev/null
-
-	# If module is not loaded load it now
-	grep -q autofs4 /proc/modules || \
-		/sbin/modprobe -k autofs4 &>/dev/null
-
-	# See if autofs module actually loaded
-	if ! grep -q -w autofs4 /proc/modules
-	then
-		exit 1
-	fi
-
-	echo -n $"Starting $prog: "
-
-	daemon /usr/sbin/autodir -d $AUTOGROUP_HOME -m $AUTOGROUP_MODULE \
-		${AUTOGROUP_OPTIONS+"-o $AUTOGROUP_OPTIONS"} \
-		${AUTOGROUP_TIMEOUT+"-t $AUTOGROUP_TIMEOUT"} \
-		${AUTOGROUP_BACKUP+"-b $AUTOGROUP_BACKUP"} \
-		${AUTOGROUP_BACKWAIT+"-w $AUTOGROUP_BACKWAIT"} \
-		${AUTOGROUP_BACKPRI+"-p $AUTOGROUP_BACKPRI"} \
-		${AUTOGROUP_MAXBACK+"-c $AUTOGROUP_MAXBACK"} \
-		-l /var/run/$prog.pid
-
-	RETVAL=$?
-	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
-	echo
+start() {
+    [ -x $exec ] || exit 5
+    [ -f $config ] || exit 6
+    # If module is not loaded, load it now
+    grep -q autofs4 /proc/modules || /sbin/modprobe -k autofs4 &>/dev/null
+    # Now start autodir for autogroup
+    echo -n $"Starting $prog: "
+    daemon $exec -d $AUTOGROUP_HOME -m $AUTOGROUP_MODULE \
+        ${AUTOGROUP_OPTIONS+"-o $AUTOGROUP_OPTIONS"} \
+        ${AUTOGROUP_TIMEOUT+"-t $AUTOGROUP_TIMEOUT"} \
+        ${AUTOGROUP_BACKUP+"-b $AUTOGROUP_BACKUP"} \
+        ${AUTOGROUP_BACKWAIT+"-w $AUTOGROUP_BACKWAIT"} \
+        ${AUTOGROUP_BACKPRI+"-p $AUTOGROUP_BACKPRI"} \
+        ${AUTOGROUP_MAXBACK+"-c $AUTOGROUP_MAXBACK"} \
+        -l /var/run/$prog.pid 2>/dev/null
+    retval=$?
+    echo
+    [ $retval -eq 0 ] && touch $lockfile
+    return $retval
 }
 
 stop() {
-	echo -n $"Stopping $prog: "
-	killproc $prog
-	RETVAL=$?
-	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
-	echo
+    echo -n $"Stopping $prog: "
+    killproc $prog
+    retval=$?
+    echo
+    [ $retval -eq 0 ] && rm -f $lockfile
+    return $retval
 }
 
 restart() {
-	stop
-	start
+    stop
+    start
 }
 
-dostatus() {
-	pid=`pidfileofproc $prog`
+reload() {
+    restart
+}
+
+force_reload() {
+    restart
+}
 
-	if [ -n "$pid" -a -d "/proc/$pid" ]
-	then
-		echo "$prog (pid $pid) running..."
-		RETVAL=0
-	else
-		echo "$prog stopped"
-		RETVAL=1
-	fi
+rh_status() {
+    status $prog
 }
 
-# See how we were called.
+rh_status_q() {
+    rh_status &>/dev/null
+}
+
+
 case "$1" in
-  start)
-	start
-	;;
-  stop)
-	stop
-	;;
-  restart|reload)
-	restart
-	;;
-  condrestart)
-	[ -f /var/lock/subsys/$prog ] && restart
-	;;
-  status)
-	dostatus
-	;;
-  *)
-	echo $"Usage: $prog {start|stop|restart|reload|condrestart|status}"
-	exit 1
+    start)
+        rh_status_q && exit 0
+        $1
+        ;;
+    stop)
+        rh_status_q || exit 0
+        $1
+        ;;
+    restart)
+        $1
+        ;;
+    reload)
+        rh_status_q || exit 7
+        $1
+        ;;
+    force-reload)
+        force_reload
+        ;;
+    status)
+        rh_status
+       ;;
+    condrestart|try-restart)
+        rh_status_q || exit 0
+        restart
+        ;;
+    *)
+        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+        exit 2
 esac
-
-exit $RETVAL
+exit $?
 


Index: autohome.init
===================================================================
RCS file: /cvs/extras/rpms/autodir/devel/autohome.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- autohome.init	22 Aug 2007 12:38:41 -0000	1.2
+++ autohome.init	11 Apr 2009 11:31:57 -0000	1.3
@@ -1,104 +1,113 @@
 #!/bin/sh
+#
+# autohome Creates user home directories on demand
+#
 # chkconfig: - 28 72
-# description: Creates user home directories on demand
+# description: Autohome creates user home directories in a transparent \
+#              manner. It relies on the autofs protocol for its operation.
 
 ### BEGIN INIT INFO
 # Provides: autohome
 # Required-Start: $local_fs
 # Required-Stop: $local_fs
+# Default-Start: 
+# Default-Stop: 0 1 2 3 4 5 6
 # Short-Description: Creates user home directories on demand
 # Description: Autohome creates user home directories in a transparent manner.
-#	It relies on the autofs protocol for its operation.
+#    It relies on the autofs protocol for its operation.
 ### END INIT INFO
 
 # Source function library.
 . /etc/init.d/functions
 
-# Source configuration
-. /etc/sysconfig/autohome
+exec="/usr/sbin/autodir"
+prog="autohome"
 
-prog=autohome
-RETVAL=0
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
 
-start() {
+lockfile=/var/lock/subsys/$prog
 
-	# If autofs old module is loaded unload it now
-	grep -q -w autofs /proc/modules || \
-		/sbin/rmmod autofs &>/dev/null
-
-	# If module is not loaded load it now
-	grep -q autofs4 /proc/modules || \
-		/sbin/modprobe -k autofs4 &>/dev/null
-
-	# See if autofs module actually loaded
-	if ! grep -q -w autofs4 /proc/modules
-	then
-		exit 1
-	fi
-
-	echo -n $"Starting $prog: "
-
-	daemon /usr/sbin/autodir -d $AUTOHOME_HOME -m $AUTOHOME_MODULE \
-		${AUTOHOME_OPTIONS+"-o $AUTOHOME_OPTIONS"} \
-		${AUTOHOME_TIMEOUT+"-t $AUTOHOME_TIMEOUT"} \
-		${AUTOHOME_BACKUP+"-b $AUTOHOME_BACKUP"} \
-		${AUTOHOME_BACKWAIT+"-w $AUTOHOME_BACKWAIT"} \
-		${AUTOHOME_BACKPRI+"-p $AUTOHOME_BACKPRI"} \
-		${AUTOHOME_MAXBACK+"-c $AUTOHOME_MAXBACK"} \
-		-l /var/run/$prog.pid
-
-	RETVAL=$?
-	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
-	echo
+start() {
+    [ -x $exec ] || exit 5
+    [ -f $config ] || exit 6
+    # If module is not loaded, load it now
+    grep -q autofs4 /proc/modules || /sbin/modprobe -k autofs4 &>/dev/null
+    # Now start autodir for autohome
+    echo -n $"Starting $prog: "
+    daemon $exec -d $AUTOHOME_HOME -m $AUTOHOME_MODULE \
+        ${AUTOHOME_OPTIONS+"-o $AUTOHOME_OPTIONS"} \
+        ${AUTOHOME_TIMEOUT+"-t $AUTOHOME_TIMEOUT"} \
+        ${AUTOHOME_BACKUP+"-b $AUTOHOME_BACKUP"} \
+        ${AUTOHOME_BACKWAIT+"-w $AUTOHOME_BACKWAIT"} \
+        ${AUTOHOME_BACKPRI+"-p $AUTOHOME_BACKPRI"} \
+        ${AUTOHOME_MAXBACK+"-c $AUTOHOME_MAXBACK"} \
+        -l /var/run/$prog.pid 2>/dev/null
+    retval=$?
+    echo
+    [ $retval -eq 0 ] && touch $lockfile
+    return $retval
 }
 
 stop() {
-	echo -n $"Stopping $prog: "
-	killproc $prog
-	RETVAL=$?
-	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
-	echo
+    echo -n $"Stopping $prog: "
+    killproc $prog
+    retval=$?
+    echo
+    [ $retval -eq 0 ] && rm -f $lockfile
+    return $retval
 }
 
 restart() {
-	stop
-	start
+    stop
+    start
 }
 
-dostatus() {
-	pid=`pidfileofproc $prog`
+reload() {
+    restart
+}
+
+force_reload() {
+    restart
+}
 
-	if [ -n "$pid" -a -d "/proc/$pid" ]
-	then
-		echo "$prog (pid $pid) running..."
-		RETVAL=0
-	else
-		echo "$prog stopped"
-		RETVAL=1
-	fi
+rh_status() {
+    status $prog
 }
 
-# See how we were called.
+rh_status_q() {
+    rh_status &>/dev/null
+}
+
+
 case "$1" in
-  start)
-	start
-	;;
-  stop)
-	stop
-	;;
-  restart|reload)
-	restart
-	;;
-  condrestart)
-	[ -f /var/lock/subsys/$prog ] && restart
-	;;
-  status)
-	dostatus
-	;;
-  *)
-	echo $"Usage: $prog {start|stop|restart|reload|condrestart|status}"
-	exit 1
+    start)
+        rh_status_q && exit 0
+        $1
+        ;;
+    stop)
+        rh_status_q || exit 0
+        $1
+        ;;
+    restart)
+        $1
+        ;;
+    reload)
+        rh_status_q || exit 7
+        $1
+        ;;
+    force-reload)
+        force_reload
+        ;;
+    status)
+        rh_status
+       ;;
+    condrestart|try-restart)
+        rh_status_q || exit 0
+        restart
+        ;;
+    *)
+        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+        exit 2
 esac
-
-exit $RETVAL
+exit $?
 




More information about the fedora-extras-commits mailing list