aboutsummaryrefslogtreecommitdiff
path: root/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sysvinit
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-09 16:44:20 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-02-09 16:44:20 +0000
commitbd5a14836a8967b9ff8b8ed1c14a0b1d8289ea52 (patch)
treeec801fc9d595e3cf483c564f0d1d9a0f6858ba52 /templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sysvinit
parentf7595585fae0e0844877ad111388837aaf74028b (diff)
downloadsimplepkg-bd5a14836a8967b9ff8b8ed1c14a0b1d8289ea52.tar.gz
simplepkg-bd5a14836a8967b9ff8b8ed1c14a0b1d8289ea52.tar.bz2
lots of changes:
- jail-update renamed to jail-commit - mkjail, jail-commit and templatepkg with svn support - templates now has permission tracking - etc git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@164 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sysvinit')
-rwxr-xr-xtemplates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sysvinit58
1 files changed, 58 insertions, 0 deletions
diff --git a/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sysvinit b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sysvinit
new file mode 100755
index 0000000..916e59e
--- /dev/null
+++ b/templates/vserver-legacy/vserver-legacy.d/etc/rc.d/rc.sysvinit
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# rc.sysvinit This file provides basic compatibility with SystemV style
+# startup scripts. The SystemV style init system places
+# start/stop scripts for each runlevel into directories such as
+# /etc/rc.d/rc3.d/ (for runlevel 3) instead of starting them
+# from /etc/rc.d/rc.M. This makes for a lot more init scripts,
+# and a more complicated execution path to follow through if
+# something goes wrong. For this reason, Slackware has always
+# used the traditional BSD style init script layout.
+#
+# However, many binary packages exist that install SystemV
+# init scripts. With rc.sysvinit in place, most well-written
+# startup scripts will work. This is primarily intended to
+# support commercial software, though, and probably shouldn't
+# be considered bug free.
+#
+# Written by Patrick Volkerding <volkerdi@slackware.com>, 1999
+# from an example by Miquel van Smoorenburg <miquels@cistron.nl>.
+
+# Run an init script:
+startup() {
+ case "$1" in
+ *.sh)
+ sh "$@"
+ ;;
+ *)
+ "$@"
+ ;;
+ esac
+}
+
+# Set onlcr to avoid staircase effect.
+stty onlcr 0>&1
+
+if [ "$runlevel" = "" ]; then
+ runlevel=$RUNLEVEL
+ export runlevel
+ prevlevel=$PREVLEVEL
+ export prevlevel
+fi
+
+# Run kill scripts in the previous runlevel if not "none"
+if [ ! "$prevlevel" = "N" ]; then
+ for script in /etc/rc.d/rc$prevlevel.d/K* ; do
+ if [ -x $script ]; then
+ startup $script stop
+ fi
+ done
+fi
+
+# Now do the startup scripts:
+for script in /etc/rc.d/rc$runlevel.d/S* ; do
+ if [ -x $script ]; then
+ startup $script start
+ fi
+done
+