| Summary: | depscan.sh not processing symlinked /etc/init.d scripts | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Gavin Panella <gavin> |
| Component: | [OLD] Core system | Assignee: | Martin Schlemmer (RETIRED) <azarah> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Gavin Panella
2003-07-10 05:38:16 UTC
This is one of those 'stone age features' that are not clear on why it
works that way. I agree that it is not optimal.
The following patch to CVS should fix this:
-------------------------------
Index: ChangeLog
===================================================================
RCS file: /home/cvsroot/gentoo-src/rc-scripts/ChangeLog,v
retrieving revision 1.235
diff -u -u -r1.235 ChangeLog
--- ChangeLog 16 Jul 2003 18:13:45 -0000 1.235
+++ ChangeLog 16 Jul 2003 18:20:08 -0000
@@ -10,6 +10,9 @@
Fix /etc/init.d/net.eth0 to not set rp_filter if already set via
/etc/sysctl.conf, bug #24235 - thanks jochen <jochen.eisinger@gmx.de>.
+ Fix /sbin/runscript.sh and /lib/rcscripts/awk/cachedepend.awk to work
+ with symlinks in /etc/init.d/, closing bug #24228.
+
15 Jul 2003; Martin Schlemmer <azarah@gentoo.org>:
Add /bin/csh to /etc/shells.
Index: sbin/runscript.sh
===================================================================
RCS file: /home/cvsroot/gentoo-src/rc-scripts/sbin/runscript.sh,v
retrieving revision 1.22
diff -u -u -r1.22 runscript.sh
--- sbin/runscript.sh 18 May 2003 21:51:34 -0000 1.22
+++ sbin/runscript.sh 16 Jul 2003 18:20:08 -0000
@@ -16,7 +16,7 @@
svcrestart="no"
myscript="$1"
-if [ -L "$1" ]
+if [ -L "$1" -a "${1%/*}" != "/etc/init.d" ]
then
myservice="$(readlink "$1")"
else
Index: src/awk/cachedepends.awk
===================================================================
RCS file: /home/cvsroot/gentoo-src/rc-scripts/src/awk/cachedepends.awk,v
retrieving revision 1.11
diff -u -u -r1.11 cachedepends.awk
--- src/awk/cachedepends.awk 21 May 2003 08:00:55 -0000 1.11
+++ src/awk/cachedepends.awk 16 Jul 2003 18:20:09 -0000
@@ -81,7 +81,7 @@
# Make sure that its a file we are working with,
# and do not process scripts, source or backup files.
for (x in TMPRCSCRIPTS)
- if ((isfile(TMPRCSCRIPTS[x])) &&
+ if (((isfile(TMPRCSCRIPTS[x])) || (islink(TMPRCSCRIPTS[x]))) &&
(TMPRCSCRIPTS[x] !~ /((\.(sh|c|bak))|\~)$/)) {
RCCOUNT++
|