Skip to contentSkip to conversation

modules.d/99base/init.sh: check for a valid init in case INIT is a symlink.

PATCH In review Juan RP 1 participant 1 message May 28, 2012

lore
Share & tools
lore

Juan RP

author
#0 lore raw

PATCH 1/2 modules.d/99base/init.sh: check for a valid init in case INIT is a symlink.

Obviously we have to test if it's executable with the PATH to NEWROOT.

---
 modules.d/99base/init.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
modules.d/99base/init.sh +1 -1
index b8736ec..b20abc4 100755
@@ -237,7 +237,7 @@ for i in "$(getarg real_init=)" "$(getarg init=)" $(getargs rd.distroinit=) /sbi
     [ -n "$i" ] || continue
 
     __p=$(readlink -f "${NEWROOT}/${i}")
-    if [ -x "$__p" ]; then
+    if [ -x "$__p" -o -x "${NEWROOT}/${__p}" ]; then
         INIT="$i"
         break
     fi
Signature · 1 line
1.7.10.2