summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjlam <jlam>2002-01-10 12:01:37 +0000
committerjlam <jlam>2002-01-10 12:01:37 +0000
commit9b53f7055373ba72cad24fd45897050bf6c40ee4 (patch)
treef78b07130e601d65c4a795df640948fbcf8bd641 /sysutils
parent762a5afc565748b219b645b80abc21ea897a49c9 (diff)
downloadpkgsrc-9b53f7055373ba72cad24fd45897050bf6c40ee4.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')
-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
}