Hi Brian,
please find attached an other patch.
si_rmimage currently does not remove the UYOK boot files from
(usually) /usr/share/systemimager/boot/ARCH/IMAGE. The patch will
try to remove them, too. Path and architecutre are determined as in
other systemimager tools/libs.
Best,
thomas
--- /usr/sbin/si_rmimage.orig 2011-04-22 01:47:05.000000000 +0200
+++ /usr/sbin/si_rmimage 2011-07-17 21:23:24.000000000 +0200
@@ -32,6 +32,10 @@
unless ($autoinstall_script_dir) {
die "FATAL: parameter AUTOINSTALL_SCRIPT_DIR is not defined in /etc/systemimager/systemimager.conf\n";
}
+my $autoinstall_boot_dir = $config->autoinstall_boot_dir();
+unless ($autoinstall_script_dir) {
+ die "FATAL: parameter AUTOINSTALL_BOOT_DIR is not defined in /etc/systemimager/systemimager.conf\n";
+}
my $rsyncd_conf = $config->rsyncd_conf();
unless ($rsyncd_conf) {
die "FATAL: parameter RSYNCD_CONF is not defined in /etc/systemimager/systemimager.conf\n";
@@ -134,6 +138,13 @@
exit 1;
}
+# get architecture of the image (for removing UYOK boot files later on)
+$file=$imagedir . "/etc/systemimager/boot/ARCH";
+open(FILE,"<$file") or die("Couldn't open $file for reading $!");
+ my $arch = (<FILE>)[0];
+close(FILE);
+chomp $arch;
+
# remove image
if($verbose) {print " Removing image $image.\n";}
$file=$imagedir;
@@ -198,4 +209,13 @@
die "$program_name: Cannot remove entry from $flamethrower_conf";
}
+# remove UYOK boot files
+if($verbose) {print " Removing UYOK files of $image.\n";}
+$file="$autoinstall_boot_dir/$arch/$image";
+if($force) {
+ if($file) { rmtree($file, 0, 0); }
+} else {
+ rmtree($file, 0, 0) or print "WARNING: failed to delete boot files in $file\n (ignore this warning if you are not using UYOK).\n";
+}
+
exit 0;
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
sisuite-users mailing list
sisuite-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-users