diff options
author | jlam <jlam> | 2001-11-21 21:38:50 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-11-21 21:38:50 +0000 |
commit | e1cbd0b961bfde35229e14b6d3c90e589503c1ef (patch) | |
tree | 62d19c3fd37e1ac0c17df9885582a76d4eab225f /sysutils | |
parent | 556710e5fadc5f77b89c26602bfd5dcf7f21198a (diff) | |
download | pkgsrc-e1cbd0b961bfde35229e14b6d3c90e589503c1ef.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.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/ups-nut/files/ups.sh | 14 | ||||
-rw-r--r-- | sysutils/ups-nut/files/upsd.sh | 12 | ||||
-rw-r--r-- | sysutils/ups-nut/files/upsdriver.sh | 12 | ||||
-rw-r--r-- | sysutils/ups-nut/files/upslog.sh | 12 | ||||
-rw-r--r-- | sysutils/ups-nut/files/upsmon.sh | 12 |
5 files changed, 31 insertions, 31 deletions
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 |