aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-04-13 15:11:04 +0000
committerBill Nottingham <notting@redhat.com>1999-04-13 15:11:04 +0000
commitdfd3eae3c12fc1d053a218b774bb6a06a2bb82fc (patch)
tree73a91cef7b9561a11c47326fe07f20fcd024ea46
parent72fb31244b9818d4ce564f632ab4d39b3ea48f64 (diff)
downloadinitscripts-dfd3eae3c12fc1d053a218b774bb6a06a2bb82fc.tar
initscripts-dfd3eae3c12fc1d053a218b774bb6a06a2bb82fc.tar.gz
initscripts-dfd3eae3c12fc1d053a218b774bb6a06a2bb82fc.tar.bz2
initscripts-dfd3eae3c12fc1d053a218b774bb6a06a2bb82fc.tar.xz
initscripts-dfd3eae3c12fc1d053a218b774bb6a06a2bb82fc.zip
add a service script for starting and stopping things. wheeeeeeeeee...
-rw-r--r--Makefile1
-rw-r--r--initscripts.spec1
-rwxr-xr-xservice11
3 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c24162fc..394bb52b 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ install:
install -m644 inputrc $(ROOT)/etc
install -m755 setsysfont $(ROOT)/sbin
install -m755 lang.sh $(ROOT)/etc/profile.d
+ install -m755 service $(ROOT)/sbin
mkdir -p $(ROOT)/etc/sysconfig
mkdir -p $(ROOT)/etc/sysconfig/console
install -m644 sysconfig/init $(ROOT)/etc/sysconfig/init
diff --git a/initscripts.spec b/initscripts.spec
index 63a3c47e..d5d9a737 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -166,6 +166,7 @@ rm -rf $RPM_BUILD_ROOT
/sbin/initlog
/sbin/loglevel
/sbin/minilogd
+/sbin/service
/usr/man/man1/doexec.1
/usr/man/man1/initlog.1
/usr/man/man1/ipcalc.1
diff --git a/service b/service
new file mode 100755
index 00000000..9337baed
--- /dev/null
+++ b/service
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ -z "$1" ]; then
+ echo "no service specified" >&2
+ exit 1
+elif [ -x "/etc/rc.d/init.d/$1" ]; then
+ "/etc/rc.d/init.d/$1" "basename \"$0\""
+else
+ echo "$1: unrecognized service" >&2
+ exit 1
+fi