summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-11-21 21:38:50 +0000
committerjlam <jlam@pkgsrc.org>2001-11-21 21:38:50 +0000
commit892b322f451ae5245d6e3c85a919169078fde83f (patch)
tree62d19c3fd37e1ac0c17df9885582a76d4eab225f
parent878e9eaf6acb17ac0eb0bac6ac0ab8bf8008f158 (diff)
downloadpkgsrc-892b322f451ae5245d6e3c85a919169078fde83f.tar.gz
These rc.d scripts are copied to ${RCD_SCRIPTS_DIR} == /etc/rc.d, so change
the test for pre-rc.d systems to just whether /etc/rc.subr is present.
-rw-r--r--audio/rplay/files/rplayd.sh12
-rwxr-xr-xnet/samba/files/nmbd.sh12
-rw-r--r--net/samba/files/samba.sh14
-rwxr-xr-xnet/samba/files/smbd.sh12
-rwxr-xr-xnet/samba20/files/nmbd.sh12
-rw-r--r--net/samba20/files/samba.sh10
-rwxr-xr-xnet/samba20/files/smbd.sh12
-rw-r--r--print/cups/files/cupsd.sh14
-rw-r--r--security/pks/files/pksd.sh12
-rw-r--r--sysutils/ups-nut/files/ups.sh14
-rw-r--r--sysutils/ups-nut/files/upsd.sh12
-rw-r--r--sysutils/ups-nut/files/upsdriver.sh12
-rw-r--r--sysutils/ups-nut/files/upslog.sh12
-rw-r--r--sysutils/ups-nut/files/upsmon.sh12
-rw-r--r--www/thttpd/files/thttpd.sh14
15 files changed, 93 insertions, 93 deletions
diff --git a/audio/rplay/files/rplayd.sh b/audio/rplay/files/rplayd.sh
index e9095dd4e38..8c475ac53c3 100644
--- a/audio/rplay/files/rplayd.sh
+++ b/audio/rplay/files/rplayd.sh
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# $NetBSD: rplayd.sh,v 1.2 2001/11/21 17:55:55 jlam Exp $
+# $NetBSD: rplayd.sh,v 1.3 2001/11/21 21:38:50 jlam Exp $
#
# PROVIDE: rplayd
# REQUIRE: DAEMON
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -15,11 +15,11 @@ rcvar=$name
command="@PREFIX@/sbin/${name}"
required_files="@CONFDIR@/rplay.conf"
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
- @ECHO@ -n ' ${name}'
- ${command} ${rplayd_flags} ${command_args}
-else
load_rc_config $name
run_rc_command "$1"
+else
+ @ECHO@ -n ' ${name}'
+ ${command} ${rplayd_flags} ${command_args}
fi
diff --git a/net/samba/files/nmbd.sh b/net/samba/files/nmbd.sh
index 95c029f60f9..3e076e3d10a 100755
--- a/net/samba/files/nmbd.sh
+++ b/net/samba/files/nmbd.sh
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# $NetBSD: nmbd.sh,v 1.5 2001/11/21 16:44:18 jlam Exp $
+# $NetBSD: nmbd.sh,v 1.6 2001/11/21 21:38:53 jlam Exp $
#
# PROVIDE: nmbd
# REQUIRE: DAEMON
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -20,11 +20,11 @@ command_args="-D" # _must_ start as daemon from rc.d;
reload_cmd=":" # avoid dumping debug output on SIGHUP
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
- @ECHO@ -n ' ${name}'
- ${command} ${nmbd_flags} ${command_args}
-else
load_rc_config $name
run_rc_command "$1"
+else
+ @ECHO@ -n ' ${name}'
+ ${command} ${nmbd_flags} ${command_args}
fi
diff --git a/net/samba/files/samba.sh b/net/samba/files/samba.sh
index 157abe0028a..b4fbdc97fae 100644
--- a/net/samba/files/samba.sh
+++ b/net/samba/files/samba.sh
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# $NetBSD: samba.sh,v 1.6 2001/11/21 16:44:18 jlam Exp $
+# $NetBSD: samba.sh,v 1.7 2001/11/21 21:38:53 jlam Exp $
#
# PROVIDE: samba
# KEYWORD: nostart
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -15,7 +15,7 @@ fi
forward_commands()
{
for file in $COMMAND_LIST; do
- /etc/rc.d/$file $_arg
+ @RCD_SCRIPTS_DIR@/$file $_arg
done
}
@@ -26,7 +26,7 @@ reverse_commands()
REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
done
for file in $REVCOMMAND_LIST; do
- /etc/rc.d/$file $_arg
+ @RCD_SCRIPTS_DIR@/$file $_arg
done
}
@@ -39,11 +39,11 @@ reload_cmd="forward_commands"
status_cmd="forward_commands"
extra_commands="reload status"
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
+ run_rc_command "$1"
+else
@ECHO@ -n ' ${name}'
_arg="$1"
${start_cmd}
-else
- run_rc_command "$1"
fi
diff --git a/net/samba/files/smbd.sh b/net/samba/files/smbd.sh
index 74b7f8a8c61..1ff02b39102 100755
--- a/net/samba/files/smbd.sh
+++ b/net/samba/files/smbd.sh
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# $NetBSD: smbd.sh,v 1.6 2001/11/21 16:44:18 jlam Exp $
+# $NetBSD: smbd.sh,v 1.7 2001/11/21 21:38:53 jlam Exp $
#
# PROVIDE: smbd
# REQUIRE: DAEMON
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -18,11 +18,11 @@ extra_commands="reload"
command_args="-D" # _must_ start as daemon from rc.d;
# add more flags through ${${name}_flags}
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
- @ECHO@ -n ' ${name}'
- ${command} ${smbd_flags} ${command_args}
-else
load_rc_config $name
run_rc_command "$1"
+else
+ @ECHO@ -n ' ${name}'
+ ${command} ${smbd_flags} ${command_args}
fi
diff --git a/net/samba20/files/nmbd.sh b/net/samba20/files/nmbd.sh
index 9f60a1d0c0c..03fdca260dc 100755
--- a/net/samba20/files/nmbd.sh
+++ b/net/samba20/files/nmbd.sh
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# $NetBSD: nmbd.sh,v 1.3 2001/11/21 17:17:44 jlam Exp $
+# $NetBSD: nmbd.sh,v 1.4 2001/11/21 21:38:53 jlam Exp $
#
# PROVIDE: nmbd
# REQUIRE: DAEMON
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -20,11 +20,11 @@ command_args="-D" # _must_ start as daemon from rc.d;
reload_cmd=":" # avoid dumping debug output on SIGHUP
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
- @ECHO@ -n ' ${name}'
- ${command} ${nmbd_flags} ${command_args}
-else
load_rc_config $name
run_rc_command "$1"
+else
+ @ECHO@ -n ' ${name}'
+ ${command} ${nmbd_flags} ${command_args}
fi
diff --git a/net/samba20/files/samba.sh b/net/samba20/files/samba.sh
index be58749b28d..af47afd53e3 100644
--- a/net/samba20/files/samba.sh
+++ b/net/samba20/files/samba.sh
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# $NetBSD: samba.sh,v 1.3 2001/11/21 17:17:44 jlam Exp $
+# $NetBSD: samba.sh,v 1.4 2001/11/21 21:38:54 jlam Exp $
#
# PROVIDE: samba
# KEYWORD: nostart
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -39,11 +39,11 @@ reload_cmd="forward_commands"
status_cmd="forward_commands"
extra_commands="reload status"
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
+ run_rc_command "$1"
+else
@ECHO@ -n ' ${name}'
_arg="$1"
${start_cmd}
-else
- run_rc_command "$1"
fi
diff --git a/net/samba20/files/smbd.sh b/net/samba20/files/smbd.sh
index 3e233312f8a..dad6f156057 100755
--- a/net/samba20/files/smbd.sh
+++ b/net/samba20/files/smbd.sh
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# $NetBSD: smbd.sh,v 1.4 2001/11/21 17:17:44 jlam Exp $
+# $NetBSD: smbd.sh,v 1.5 2001/11/21 21:38:54 jlam Exp $
#
# PROVIDE: smbd
# REQUIRE: DAEMON
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -18,11 +18,11 @@ extra_commands="reload"
command_args="-D" # _must_ start as daemon from rc.d;
# add more flags through ${${name}_flags}
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
- @ECHO@ -n ' ${name}'
- ${command} ${smbd_flags} ${command_args}
-else
load_rc_config $name
run_rc_command "$1"
+else
+ @ECHO@ -n ' ${name}'
+ ${command} ${smbd_flags} ${command_args}
fi
diff --git a/print/cups/files/cupsd.sh b/print/cups/files/cupsd.sh
index 1274fe6db0d..cd438d6c432 100644
--- a/print/cups/files/cupsd.sh
+++ b/print/cups/files/cupsd.sh
@@ -1,13 +1,13 @@
#! /bin/sh
#
-# $NetBSD: cupsd.sh,v 1.6 2001/11/21 15:35:09 jlam Exp $
+# $NetBSD: cupsd.sh,v 1.7 2001/11/21 21:38:54 jlam Exp $
#
# Common UNIX Printing System daemon
#
# PROVIDE: cupsd
# REQUIRE: DAEMON
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -18,11 +18,11 @@ command="@PREFIX@/sbin/${name}"
required_files="@CONFDIR@/cups/${name}.conf"
extra_commands="reload"
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
+ load_rc_config $name
+ run_rc_command "$1"
+else
@ECHO@ -n " ${name}"
- exec ${command} ${cupsd_flags} ${command_args}
+ ${command} ${cupsd_flags} ${command_args}
fi
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/security/pks/files/pksd.sh b/security/pks/files/pksd.sh
index a07473542da..e929c037780 100644
--- a/security/pks/files/pksd.sh
+++ b/security/pks/files/pksd.sh
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# $NetBSD: pksd.sh,v 1.3 2001/11/21 15:14:02 jlam Exp $
+# $NetBSD: pksd.sh,v 1.4 2001/11/21 21:38:54 jlam Exp $
#
# PROVIDE: pksd
# REQUIRE: DAEMON
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -67,12 +67,12 @@ start_precmd=pksd_dbinit
start_cmd=pksd_start
stop_cmd=pksd_stop
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
+ load_rc_config $name
+ run_rc_command "$1"
+else
@ECHO@ -n " ${name}"
pksd_dbinit
pksd_start
-else
- load_rc_config $name
- run_rc_command "$1"
fi
diff --git a/sysutils/ups-nut/files/ups.sh b/sysutils/ups-nut/files/ups.sh
index 9fa9072931e..226a05c0a62 100644
--- a/sysutils/ups-nut/files/ups.sh
+++ b/sysutils/ups-nut/files/ups.sh
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# $NetBSD: ups.sh,v 1.3 2001/11/21 16:29:13 jlam Exp $
+# $NetBSD: ups.sh,v 1.4 2001/11/21 21:38:55 jlam Exp $
#
# PROVIDE: ups
# KEYWORD: nostart
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -15,7 +15,7 @@ fi
forward_commands()
{
for file in $COMMAND_LIST; do
- /etc/rc.d/$file $_arg
+ @RCD_SCRIPTS_DIR@/$file $_arg
done
}
@@ -26,7 +26,7 @@ reverse_commands()
REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
done
for file in $REVCOMMAND_LIST; do
- /etc/rc.d/$file $_arg
+ @RCD_SCRIPTS_DIR@/$file $_arg
done
}
@@ -38,11 +38,11 @@ stop_cmd="reverse_commands"
status_cmd="forward_commands"
extra_commands="status"
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
+ run_rc_command "$1"
+else
@ECHO@ -n " ${name}"
_arg="$1"
${start_cmd}
-else
- run_rc_command "$1"
fi
diff --git a/sysutils/ups-nut/files/upsd.sh b/sysutils/ups-nut/files/upsd.sh
index b063fb4310f..29ef15c9ff0 100644
--- a/sysutils/ups-nut/files/upsd.sh
+++ b/sysutils/ups-nut/files/upsd.sh
@@ -1,11 +1,11 @@
#! /bin/sh
#
-# $NetBSD: upsd.sh,v 1.1 2001/11/21 15:50:56 jlam Exp $
+# $NetBSD: upsd.sh,v 1.2 2001/11/21 21:38:55 jlam Exp $
#
# PROVIDE: upsd
# REQUIRE: upsdriver
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -16,11 +16,11 @@ command="@PREFIX@/sbin/${name}"
required_files="@NUT_CONFDIR@/${name}.conf"
pidfile="@NUT_STATEDIR@/${name}.pid"
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.d ]
then
- @ECHO@ -n " ${name}"
- ${command} ${upsd_flags} ${command_args}
-else
load_rc_config $name
run_rc_command "$1"
+else
+ @ECHO@ -n " ${name}"
+ ${command} ${upsd_flags} ${command_args}
fi
diff --git a/sysutils/ups-nut/files/upsdriver.sh b/sysutils/ups-nut/files/upsdriver.sh
index 5c332fe3018..67ecefeb834 100644
--- a/sysutils/ups-nut/files/upsdriver.sh
+++ b/sysutils/ups-nut/files/upsdriver.sh
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# $NetBSD: upsdriver.sh,v 1.2 2001/11/21 20:39:40 jlam Exp $
+# $NetBSD: upsdriver.sh,v 1.3 2001/11/21 21:38:55 jlam Exp $
#
# PROVIDE: upsdriver
# REQUIRE: NETWORK syslogd mountcritremote
@@ -16,7 +16,7 @@
# drivers. Please refer to nutupsdrv(8) for more information about the
# arguments to pass to the UPS drivers.
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -24,7 +24,7 @@ fi
name="upsdriver"
rcvar=$name
-if [ -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
load_rc_config $name
fi
@@ -44,8 +44,10 @@ else
#pidfile="@NUT_STATEDIR@/${upsdriver_type}-${tty}.pid"
fi
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
+ run_rc_command "$1"
+else
@ECHO@ -n " ${name}"
if [ -n "${start_cmd}" ]
then
@@ -53,6 +55,4 @@ then
else
${command} ${upsdriver_flags} ${command_args}
fi
-else
- run_rc_command "$1"
fi
diff --git a/sysutils/ups-nut/files/upslog.sh b/sysutils/ups-nut/files/upslog.sh
index 2d1349177f3..2da1511cc1e 100644
--- a/sysutils/ups-nut/files/upslog.sh
+++ b/sysutils/ups-nut/files/upslog.sh
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# $NetBSD: upslog.sh,v 1.1 2001/11/21 15:50:56 jlam Exp $
+# $NetBSD: upslog.sh,v 1.2 2001/11/21 21:38:55 jlam Exp $
#
# PROVIDE: upslog
# REQUIRE: upsd
@@ -14,7 +14,7 @@
# Please refer to upslog(8) for more information about the arguments to pass
# to upslog.
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -25,11 +25,11 @@ command="@PREFIX@/bin/${name}"
pidfile="/var/run/${name}.pid"
required_files="@CONFDIR@/nut/${name}.conf"
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
- @ECHO@ -n " ${name}"
- ${command} ${upsmon_flags} ${command_args}
-else
load_rc_config $name
run_rc_command "$1"
+else
+ @ECHO@ -n " ${name}"
+ ${command} ${upsmon_flags} ${command_args}
fi
diff --git a/sysutils/ups-nut/files/upsmon.sh b/sysutils/ups-nut/files/upsmon.sh
index 841f39ec234..338fcbba5c2 100644
--- a/sysutils/ups-nut/files/upsmon.sh
+++ b/sysutils/ups-nut/files/upsmon.sh
@@ -1,11 +1,11 @@
#! /bin/sh
#
-# $NetBSD: upsmon.sh,v 1.1 2001/11/21 15:50:56 jlam Exp $
+# $NetBSD: upsmon.sh,v 1.2 2001/11/21 21:38:55 jlam Exp $
#
# PROVIDE: upsmon
# REQUIRE: upsd
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -16,11 +16,11 @@ command="@PREFIX@/sbin/${name}"
pidfile="/var/run/${name}.pid"
required_files="@NUT_CONFDIR@/${name}.conf"
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
- @ECHO@ -n " ${name}"
- ${command} ${upsmon_flags} ${command_args}
-else
load_rc_config $name
run_rc_command "$1"
+else
+ @ECHO@ -n " ${name}"
+ ${command} ${upsmon_flags} ${command_args}
fi
diff --git a/www/thttpd/files/thttpd.sh b/www/thttpd/files/thttpd.sh
index d5ffb3848c1..61af6bf0f4a 100644
--- a/www/thttpd/files/thttpd.sh
+++ b/www/thttpd/files/thttpd.sh
@@ -1,11 +1,11 @@
#!/bin/sh
#
-# $NetBSD: thttpd.sh,v 1.5 2001/11/19 16:23:17 jlam Exp $
+# $NetBSD: thttpd.sh,v 1.6 2001/11/21 21:38:55 jlam Exp $
#
# PROVIDE: thttpd
# REQUIRE: DAEMON
-if [ -d /etc/rc.d -a -f /etc/rc.subr ]
+if [ -e /etc/rc.subr ]
then
. /etc/rc.subr
fi
@@ -16,11 +16,11 @@ command=@PREFIX@/sbin/${name}
command_args="-C @CONFDIR@/${name}.conf"
required_files="@CONFDIR@/${name}.conf"
-if [ ! -d /etc/rc.d ]
+if [ -e /etc/rc.subr ]
then
+ load_rc_config $name
+ run_rc_command "$1"
+else
@ECHO@ -n " ${name}"
- exec ${command} ${thttpd_flags} ${command_args}
+ ${command} ${thttpd_flags} ${command_args}
fi
-
-load_rc_config $name
-run_rc_command "$1"