diff options
-rwxr-xr-x | preseed.sh | 4 | ||||
-rwxr-xr-x | virtualenv/virt | 1 |
2 files changed, 3 insertions, 2 deletions
@@ -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 |