Author: jurij-guest
Date: Tue Feb  6 07:08:02 2007
New Revision: 8271

Modified:
   dists/trunk/ipw3945d/debian/init
Log:
Create PID directory if it does not exist, allowing
to put /var/run on tmpfs.


Modified: dists/trunk/ipw3945d/debian/init
==============================================================================
--- dists/trunk/ipw3945d/debian/init    (original)
+++ dists/trunk/ipw3945d/debian/init    Tue Feb  6 07:08:02 2007
@@ -100,10 +100,19 @@
   log_end_msg 0
 }
 
+# Create a pid directory if one does not exist. This may happen if
+# user has chosen to mount /var/run as tmpfs.
+make_pid_dir () {
+  test -d "${DAEMON_PID_DIR}" && return
+  mkdir -p -m 0755 "${DAEMON_PID_DIR}"
+  chown "${DAEMON_OWNER}" "${DAEMON_PID_DIR}"
+}
+
 test -x "${DAEMON_BINARY}" || exit 0
 
 case "$1" in
   start)
+    make_pid_dir
     start_daemon
     ;;
   stop)
@@ -116,6 +125,7 @@
   # The modprobe-* targets are supposed to be used
   # from modprobe hooks only.
   modprobe-start)
+    make_pid_dir
     can_write_pid || exit 0
     start_daemon
     ;;

_______________________________________________
Kernel-svn-changes mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/kernel-svn-changes

Reply via email to