aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpreseed.sh4
-rwxr-xr-xvirtualenv/virt1
2 files changed, 3 insertions, 2 deletions
diff --git a/preseed.sh b/preseed.sh
index ff88535..729f97e 100755
--- a/preseed.sh
+++ b/preseed.sh
@@ -37,8 +37,8 @@ cp preseed.cfg "$isoeditdir/"
md5sum ./preseed.cfg >> "$isoeditdir/md5sum.txt"
cfg="$isoeditdir/isolinux/*.cfg $isoeditdir/isolinux/*/*.cfg"
-[ -d $isoeditdir/boot -a -d $isoeditdir/boot/grub ] && cfg="$cfg $isoeditdir/boot/grub/grub.cfg"
-sed -ri "s@auto=true\s+priority=critical\b@& file=/cdrom/preseed.cfg @" $cfg
+[ -f $isoeditdir/boot/grub/grub.cfg ] && cfg="$cfg $isoeditdir/boot/grub/grub.cfg"
+sed -ri 's@^\s+(append|linux)\s(.*\s)?auto=true\s(.*\s)?priority=critical\b@& file=/cdrom/preseed.cfg@' $cfg
# ^ no need to update isolinux' checksum, as it's not in './md5sum.txt'.
mkdir "$isoeditdir/include"
diff --git a/virtualenv/virt b/virtualenv/virt
index 99a058d..2bcbe4b 100755
--- a/virtualenv/virt
+++ b/virtualenv/virt
@@ -61,6 +61,7 @@ install() {
[ $# -eq 1 -o $# -eq 2 ] || usage
local name=$1
local disk=${2:-$root/images/${name}.qcow2}
+ [ -d "$root/images" ] || mkdir "$root/images"
local darch
case "${ARCH:=$(/bin/uname -m)}" in