[prev in list] [next in list] [prev in thread] [next in thread]
List: debian-hurd
Subject: Bug#737759: hurd: Add init.d script to create /var/run/mtab
From: Petter Reinholdtsen <pere () hungry ! com>
Date: 2014-02-06 11:14:37
Message-ID: 20140206111436.GA13272 () ulrik ! uio ! no
[Download RAW message or body]
Here is a more complete patch to implement my proposed change. It
drop the symlinking in /etc/hurd/rc and do it in an init.d scripts
instead.
--
Happy hacking
Petter Reinholdtsen
["hurd.diff" (text/plain)]
diff -ur hurd-0.5.git20140203/debian/patches/rc.patch hurd-0.5.git20140203-pere/debian/patches/rc.patch
--- hurd-0.5.git20140203/debian/patches/rc.patch 2014-02-03 22:42:04.000000000 +0000
+++ hurd-0.5.git20140203-pere/debian/patches/rc.patch 2014-02-06 08:27:47.000000000 +0000
@@ -3,9 +3,11 @@
daemons/rc.sh | 43 ++++++++++++++++++++++++++++++++-----------
1 file changed, 32 insertions(+), 11 deletions(-)
---- a/daemons/rc.sh
-+++ b/daemons/rc.sh
-@@ -19,14 +19,17 @@ then
+Index: hurd-0.5.git20140203/daemons/rc.sh
+===================================================================
+--- hurd-0.5.git20140203.orig/daemons/rc.sh 2014-02-03 22:41:15.000000000 +0000
++++ hurd-0.5.git20140203/daemons/rc.sh 2014-02-06 08:27:44.000000000 +0000
+@@ -19,14 +19,17 @@
echo Automatic boot in progress...
date
@@ -24,7 +26,7 @@
;;
# Filesystem modified, filesystem should be restarted
# Ideally we would only restart the filesystem
-@@ -85,12 +88,25 @@ if test -d /tmp; then
+@@ -90,12 +93,22 @@
fi
if test -d /var/run; then
@@ -47,13 +49,10 @@
+if ! test -e /proc/cmdline ; then
+ settrans -c /proc /hurd/procfs --compatible
+fi
-+
-+# This file must exist for e2fsck to work.
-+ln -s /proc/mounts /var/run/mtab
#echo -n restoring pty permissions...
#chmod 666 /dev/tty[pqrs]*
-@@ -104,15 +120,25 @@ touch /var/run/mtab
+@@ -109,15 +122,25 @@
chmod 664 /etc/motd
diff -ur hurd-0.5.git20140203/debian/rules hurd-0.5.git20140203-pere/debian/rules
--- hurd-0.5.git20140203/debian/rules 2014-02-03 22:42:04.000000000 +0000
+++ hurd-0.5.git20140203-pere/debian/rules 2014-02-06 08:23:34.000000000 +0000
@@ -89,6 +89,7 @@
override_dh_installinit:
dh_installinit -phurd --name=hurd-console
+ dh_installinit -phurd --name=hurd-mtab
dh_installinit --remaining-packages
override_dh_installchangelogs:
diff -ur hurd-0.5.git20140203/debian/hurd-mtab.init hurd-0.5.git20140203-pere/debian/hurd-mtab.init
--- /dev/null 2013-05-04 00:20:10.000000000 +0000
+++ hurd-0.5.git20140203-pere/debian/hurd-mtab.init 2014-02-06 08:23:09.000000000 +0000
@@ -0,0 +1,50 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: hurd-mtab
+# Required-Start: mountkernfs
+# Required-Stop:
+# Default-Start: S
+# Default-Stop:
+# Short-Description: Create /run/mtab -> /proc/mount symlink on Hurd
+### END INIT INFO
+
+# Author: Petter Reinholdtsen
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/bin
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+VERBOSE=yes
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ ln -s /proc/mount /run/mtab
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_action_begin_msg "Creating /run/mtab symlink"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_action_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_action_end_msg 1 ;;
+ esac
+ ;;
+ stop|restart|force-reload|status)
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
--
To UNSUBSCRIBE, email to debian-hurd-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20140206111436.GA13272@ulrik.uio.no
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic