]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
ts-xen-install: bomb out of after installation we find things in /usr/local/var or...
authorIan Jackson <iwj@woking.cam.xci-test.com>
Fri, 25 Jan 2013 12:14:41 +0000 (12:14 +0000)
committerIan Jackson <iwj@woking.cam.xci-test.com>
Mon, 28 Jan 2013 11:17:15 +0000 (11:17 +0000)
ts-xen-install

index 68a2787925524418225b2c4a7f5b25f461862eb8..f9e799ed2a02cd515cf36a2c81cc876153b0b3e5 100755 (executable)
@@ -219,6 +219,26 @@ END
     });
 }    
 
+sub forbidden () {
+    target_cmd_root($ho, <<'END');
+       outcome=true
+       for f in /usr/local/etc/* /usr/local/var/*; do
+           if test -e "$f"; then
+               case "$f" in
+               /usr/local/etc/qemu)
+                    echo >&2 "*** WARNING IGNORING FORBIDDEN PATH: $f"
+                    ;;
+                *)
+                   echo >&2 "*** FORBIDDEN PATH IN USE, install problem: $f"
+                   outcome=false
+                    ;;
+                esac
+           fi
+       done
+       $outcome
+END
+}
+
 if ($checkmode) {
     extract();
 } else {
@@ -227,6 +247,7 @@ if ($checkmode) {
     
     packages();
     extract();
+    forbidden();
     adjustconfig();
     setupboot();
     setupinitd();