From: Ian Campbell Subject: [PATCH OSSTEST] Debian: handle move of ip(8) to /sbin in Jessie Date: Mon, 21 Sep 2015 16:14:33 +0100 Message-ID: <1442848473-9119-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- 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'} ? <{Ether}", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="$wantphysif" END -- 2.5.1