[-]
[+]
|
Added |
daemontools-0.76-init.diff
|
@@ -0,0 +1,59 @@
+diff -ruN daemontools-0.76-orig/package/run daemontools-0.76/package/run
+--- daemontools-0.76-orig/package/run 2001-07-12 18:49:49.000000000 +0200
++++ daemontools-0.76/package/run 2005-12-05 00:58:51.000000000 +0100
+@@ -1,21 +1,10 @@
+ #!/bin/sh -e
+
+ umask 022
+-test -d package || ( echo 'Wrong working directory.'; exit 1 )
+-test -d src || ( echo 'Wrong working directory.'; exit 1 )
++[ -d /command/package ] || ( echo 'Wrong working directory.'; exit 1 )
+
+-if test -d /service
+-then
+- echo '/service exists. I assume that svscan is already running.'
+- exit 0
+-fi
+-
+-echo 'Creating /service...'
+-mkdir /service
+-
+-if test -r /etc/inittab
+-then
+- /command/setlock /etc/inittab package/run.inittab
++if [ -r /etc/inittab ]; then
++ /command/setlock /etc/inittab /command/package/run.inittab
+ else
+- /command/setlock /etc/rc.local package/run.rclocal
++ /command/setlock /etc/rc.local /command/package/run.rclocal
+ fi
+diff -ruN daemontools-0.76-orig/package/run.inittab daemontools-0.76/package/run.inittab
+--- daemontools-0.76-orig/package/run.inittab 2001-07-12 18:49:49.000000000 +0200
++++ daemontools-0.76/package/run.inittab 2005-12-05 00:05:26.000000000 +0100
+@@ -6,7 +6,7 @@
+ else
+ echo 'Adding svscanboot to inittab...'
+ rm -f /etc/inittab'{new}'
+- cat /etc/inittab package/boot.inittab > /etc/inittab'{new}'
++ cat /etc/inittab /command/package/boot.inittab > /etc/inittab'{new}'
+ mv -f /etc/inittab'{new}' /etc/inittab
+ kill -HUP 1
+ echo 'init should start svscan now.'
+diff -ruN daemontools-0.76-orig/package/uninstall daemontools-0.76/package/uninstall
+--- daemontools-0.76-orig/package/uninstall 1970-01-01 01:00:00.000000000 +0100
++++ daemontools-0.76/package/uninstall 2005-12-05 01:11:02.000000000 +0100
+@@ -0,0 +1,14 @@
++#!/bin/bash
++
++grep "^SV:123456:respawn:/comm" /etc/inittab >/dev/null
++if [ $? = 0 ]; then
++ echo 'removing svscanboot from inittab...'
++ rm -f /etc/inittab'{new}'
++ #cat boot.inittab | sed -e 's/\(^SV:123456:respawn.*\)/#\1/'
++ cat /etc/inittab | sed -e '/^SV:123456:respawn:\/comm.*/d' > /etc/inittab'{new}'
++ mv -f /etc/inittab'{new}' /etc/inittab
++ init q
++ echo 'init is re-examind'
++else
++ echo 'innittab does not contain a scanbootline'
++fi
|