[Initscripts-ng-commits] r860 - /trunk/src/insserv/debian/patches/50_symlink_in_initddir.dpatch
kelmo-guest at users.alioth.debian.org
kelmo-guest at users.alioth.debian.org
Fri Sep 19 13:39:21 UTC 2008
Author: kelmo-guest
Date: Fri Sep 19 13:39:21 2008
New Revision: 860
URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=860
Log:
Simplify debian/patches/50_symlink_in_initddir.dpatch to be even more targetted at what it should be fixing.
Modified:
trunk/src/insserv/debian/patches/50_symlink_in_initddir.dpatch
Modified: trunk/src/insserv/debian/patches/50_symlink_in_initddir.dpatch
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/patches/50_symlink_in_initddir.dpatch?rev=860&op=diff
==============================================================================
--- trunk/src/insserv/debian/patches/50_symlink_in_initddir.dpatch (original)
+++ trunk/src/insserv/debian/patches/50_symlink_in_initddir.dpatch Fri Sep 19 13:39:21 2008
@@ -23,7 +23,7 @@
{
if (S_ISDIR(st_script.st_mode))
continue;
-@@ -2555,6 +2556,48 @@
+@@ -2555,6 +2556,43 @@
continue;
}
@@ -33,7 +33,7 @@
+ */
+ if (S_ISLNK(st_script.st_mode) && ((strcmp(d->d_name, "reboot") != 0)))
+ {
-+ char * basename;
++ char * base;
+ char linkbuf[PATH_MAX+1];
+ int linklen;
+
@@ -42,16 +42,11 @@
+ continue;
+ linkbuf[linklen] = '\0';
+
-+ if ((basename = strrchr(linkbuf, '/')))
-+ basename++;
-+ else
-+ basename = xstrdup(linkbuf);
-+
-+ /* skip symbolic links to other scripts in this path */
-+ if (xstat(dfd, basename, &st_script) == 0) {
++ /* skip symbolic links to other scripts in this relative path */
++ if (!(base = strrchr(linkbuf, '/'))) {
+ if (isarg)
-+ warn("script %s is a symlink to another script %s, skipped!\n",
-+ d->d_name, basename);
++ warn("script %s is a symlink to another script, skipped!\n",
++ d->d_name);
+ continue;
+ }
+
More information about the Initscripts-ng-commits
mailing list