|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 08/12] ts-guests-nbd-mirror: purge old packages first
Purge any old nbd-client and nbd-server _before_ we make their config.
This only has any effect if the packages are installed before this
script starts, which isn't the case in any of the automatically-run
recipes. But it can occur when the script is being tested by hand.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
ts-guests-nbd-mirror | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ts-guests-nbd-mirror b/ts-guests-nbd-mirror
index 89508dd..c0a021a 100755
--- a/ts-guests-nbd-mirror
+++ b/ts-guests-nbd-mirror
@@ -52,6 +52,8 @@ sub findvols () {
}
sub configserver () {
+ target_cmd_root($sho, "dpkg --purge nbd-server ||:");
+
my $scfg= <<END;
# generated by $0
[generic]
@@ -67,7 +69,6 @@ END
END
}
- target_cmd_root($sho, "dpkg --purge nbd-server ||:");
target_cmd_root($sho, "mkdir -p /etc/nbd-server");
target_putfilecontents_root_stash($sho,10, $scfg,
"/etc/nbd-server/config", "${srvhost}_nbd-server_config");
@@ -75,6 +76,8 @@ END
}
sub configclient () {
+ target_cmd_root($cho, "dpkg --purge nbd-client ||:");
+
my $mydaemon= '/root/nbd-client-async';
target_putfilecontents_root_stash($cho,10,<<'END',$mydaemon);
#!/bin/sh
@@ -99,7 +102,6 @@ NBD_HOST[$v->{Ix}]=$sho->{Name}
NBD_PORT[$v->{Ix}]=$v->{Port}
END
}
- target_cmd_root($cho, "dpkg --purge nbd-client ||:");
target_putfilecontents_root_stash($cho,10,$ccfg,"/etc/nbd-client");
target_install_packages($cho, qw(nbd-client));
}
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |