summaryrefslogtreecommitdiff
path: root/sysutils/ups-nut
diff options
context:
space:
mode:
authorjlam <jlam>2002-01-10 12:01:37 +0000
committerjlam <jlam>2002-01-10 12:01:37 +0000
commit6be117d0b99a50595f1c87ea0a81b8683b671054 (patch)
treef78b07130e601d65c4a795df640948fbcf8bd641 /sysutils/ups-nut
parentdb476acaec0bd76062af06aa1b30ecfe95e18bab (diff)
downloadpkgsrc-6be117d0b99a50595f1c87ea0a81b8683b671054.tar.gz
Don't hardcode the location of the other rc.d scripts as @RCD_SCRIPTS_DIR@
as they might not be there depending on whether INSTALL_RCD_SCRIPTS is set in /etc/mk.conf when the package is built. Instead, assume that the other rc.d scripts are in the same place as this "meta" script and locate them using "dirname $0". Problem noted by Stoned Elipot <seb@netbsd.org> in private email.
Diffstat (limited to 'sysutils/ups-nut')
-rw-r--r--sysutils/ups-nut/files/ups.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysutils/ups-nut/files/ups.sh b/sysutils/ups-nut/files/ups.sh
index e39a1d7a396..d87cf7df128 100644
--- a/sysutils/ups-nut/files/ups.sh
+++ b/sysutils/ups-nut/files/ups.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: ups.sh,v 1.5 2001/11/22 00:55:51 lukem Exp $
+# $NetBSD: ups.sh,v 1.6 2002/01/10 12:01:38 jlam Exp $
#
# KEYWORD: nostart
@@ -9,12 +9,14 @@ then
. /etc/rc.subr
fi
+rcd_dir=`@DIRNAME@ $0`
+
# NOTE: run_rc_command sets $_arg
#
forward_commands()
{
for file in $COMMAND_LIST; do
- @RCD_SCRIPTS_DIR@/$file $_arg
+ $rcd_dir/$file $_arg
done
}
@@ -25,7 +27,7 @@ reverse_commands()
REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
done
for file in $REVCOMMAND_LIST; do
- @RCD_SCRIPTS_DIR@/$file $_arg
+ $rcd_dir/$file $_arg
done
}