Skip to contentSkip to conversation

Don't use absolute path for ip, does not always work

PATCH In review Seewer Philippe 3 participants 6 messages Jun 5, 2009 5 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't use absolute path for ip, does not always work

---

modules.d/40network/dhclient-script +1 -1
index 1ee78fe..d283762 100755
@@ -69,7 +69,7 @@ setup_interface() {
 
 case $reason in
     PREINIT)
-       run /sbin/ip link set $netif up
+       run ip link set $netif up
        ;;
     BOUND)
        setup_interface

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 7 lines · Seewer Philippe

---

modules.d/40network/dhclient-script +0 -0
index 1ee78fe..d283762 100755

modules.d/40network/dhclient-script setup_interface() { · line 75

Quoted 8 lines
modules.d/40network/dhclient-script +1 -1
@@ -69,7 +69,7 @@ setup_interface() {
 
 case $reason in
     PREINIT)
-       run /sbin/ip link set $netif up
+       run ip link set $netif up
        ;;
     BOUND)
        setup_interface

Why does it not always work, unless you're breaking your initramfs?

Bill
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20090605155900.GI5107-Zdt1ptygihhQcNjhGXsBABcY2uh10dtjAL8bYrjMMd8@public.gmane.org

#4 lore raw
Quoted 9 lines · Bill Nottingham
Quoted 8 lines · Seewer Philippe

---

modules.d/40network/dhclient-script +0 -0
index 1ee78fe..d283762 100755
@@ -69,7 +69,7 @@ setup_interface() {
 
Quoted 9 lines

modules.d/40network/dhclient-script setup_interface() { · line 75

Quoted 7 lines

case $reason in
PREINIT)

modules.d/40network/dhclient-script +1 -1
-       run /sbin/ip link set $netif up
+       run ip link set $netif up
       ;;
    BOUND)
       setup_interface

Why does it not always work, unless you're breaking your initramfs?

What if your distro does not put ip in /sbin?

Besides, hardcoding executable locations when we know we have a sane path is silly.

Quoted 7 lines

Bill
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 3EFC8CBF-4F49-4713-9F04-D17977415107-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#6 lore raw
Quoted 3 lines · Victor Lowther
Quoted 1 line

Why does it not always work, unless you're breaking your initramfs?

What if your distro does not put ip in /sbin?

I was under the impression that the generation already put it in a known place, in which case there's no reason to worry about it being elsewhere. I checked again, and that's not the case.

Bill
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20090605172727.GB7539-Zdt1ptygihhQcNjhGXsBABcY2uh10dtjAL8bYrjMMd8@public.gmane.org

#8 lore raw
Quoted 8 lines · Bill Nottingham
Quoted 3 lines · Victor Lowther
Quoted 1 line

Why does it not always work, unless you're breaking your initramfs?

What if your distro does not put ip in /sbin?

I was under the impression that the generation already put it in a known place, in which case there's no reason to worry about it being elsewhere. I checked again, and that's not the case.

I should hope so, otherwise writing the install code to be as distro agnostic as feasible was all for naught. :)

Quoted 2 lines

Bill

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): F96FDD9C-4009-4E3E-AD7D-C8640ECF003C-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#10 lore raw
Quoted 5 lines · Victor Lowther
Quoted 3 lines · Bill Nottingham
Quoted 2 lines · Victor Lowther
Quoted 1 line

Why does it not always work, unless you're breaking your initramfs?

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

What if your distro does not put ip in /sbin?

I was under the impression that the generation already put it in a known place, in which case there's no reason to worry about it being elsewhere. I checked again, and that's not the case.

I should hope so, otherwise writing the install code to be as distro agnostic as feasible was all for naught. :)

I guess I should have formulated my post better.

ip get's copied in, no worries. dracut_install ip works perfectly. Since it looks everywhere sensible for the utility if no path is provided.

Problem is that debian puts ip in /bin not /sbin. So the code almost always works, except for debian.

Regards,
Philippe
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html