|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST] Debian: handle move of ip(8) to /sbin in Jessie
Unfortunately udev treats non-absolute commands as relative to
/lib/udev rather than consulting $PATH, so we have to figure out the
path based on the suite.
Without this the force-mac-address workaround (needed on Arndale)
doesn't work.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
ts-host-install | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ts-host-install b/ts-host-install
index f734a9c..cc91ccb 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -235,10 +235,12 @@ sub setup_pxeboot_firstboot($) {
die "need Ether for $ho->{Name} ($wantphysif)"
unless defined $ho->{Ether};
system_checked(qw(mkdir -p --), "$initrd_overlay.d/etc/udev/rules.d");
+ # ip(8) moved to /sbin in Jessie
+ my $ipcmd = $ho->{Suite} =~ m/wheezy/ ? "/bin/ip" : "/sbin/ip";
file_simple_write_contents
("$initrd_overlay.d/etc/udev/rules.d/70-persistent-net.rules",
$ho->{Flags}{'force-mac-address'} ? <<END : <<END);
-SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="$wantphysif", RUN +=
"/bin/ip link set $wantphysif address $ho->{Ether}"
+SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="$wantphysif", RUN +=
"$ipcmd link set $wantphysif address $ho->{Ether}"
END
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="$ho->{Ether}",
ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="$wantphysif"
END
--
2.5.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |