summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-01-10 12:01:37 +0000
committerjlam <jlam@pkgsrc.org>2002-01-10 12:01:37 +0000
commit6bc0c4b0623100d75a79589740cded1725e4c73a (patch)
treef78b07130e601d65c4a795df640948fbcf8bd641
parent75d4a2f45b0df566197ab8db0e2b2f8aaf0963b2 (diff)
downloadpkgsrc-6bc0c4b0623100d75a79589740cded1725e4c73a.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.
-rw-r--r--net/samba/files/samba.sh8
-rw-r--r--sysutils/ups-nut/files/ups.sh8
2 files changed, 10 insertions, 6 deletions
diff --git a/net/samba/files/samba.sh b/net/samba/files/samba.sh
index ab7e0c4b73b..e7641771a81 100644
--- a/net/samba/files/samba.sh
+++ b/net/samba/files/samba.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: samba.sh,v 1.8 2001/11/22 00:58:24 lukem Exp $
+# $NetBSD: samba.sh,v 1.9 2002/01/10 12:01:37 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
}
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
}