ubuntu-14.04)
wget -q https://help.ubuntu.com/lts/installation-guide/$preseed
wget -qN http://archive.ubuntu.com/ubuntu/dists/trusty/$neboot_path
- sed -ri 's!^tasksel tasksel/first multiselect .*!#\0!' $preseed
+ sed -ri --follow-symlinks 's!^tasksel tasksel/first multiselect .*!#\0!' $preseed
echo 'tasksel tasksel/first multiselect ubuntu-server, openssh-server' >>$preseed
;;
debian-jessie)
# keymap=us is only needed for debian.
pxe_cfg=${distro%-*}-installer/amd64/boot-screens/txt.cfg
-sed -ri "s#^[[:space:]]*append[[:space:]]#\0auto priority=critical locale=en_US.UTF-8 netcfg/choose_interface=auto url=tftp://$ip/example-preseed.txt keymap=us#" $pxe_cfg
+sed="sed -ri --follow-symlinks"
+$sed "s#^[[:space:]]*append[[:space:]]#\0auto priority=critical locale=en_US.UTF-8 netcfg/choose_interface=auto url=tftp://$ip/example-preseed.txt keymap=us#" $pxe_cfg
# various google results say timeout x will result in doing the default thing,
# but that doesn't happen. no idea why. Maybe it needed to be part of the label.
echo 'totaltimeout 1' | tee -a $pxe_cfg
if $interactive_partition; then
- sed -ri 's/^d-i[[:space:]]partman.*/#\0/' $preseed
+ $sed 's/^d-i[[:space:]]partman.*/#\0/' $preseed
# at least in ubuntu, this does automatic selection of boot device,
# and on a server where we setup raid, it choose sda, and failed
# and the whole installation could not be salvaged.
- sed -ri 's/^d-i[[:space:]]grub-installer.*/#\0/' $preseed
+ $sed 's/^d-i[[:space:]]grub-installer.*/#\0/' $preseed
fi
-sed -ri "s#(^d-i time/zone string US/).*#\1Pacific#" $preseed
-sed -ri '/^xserver-xorg/,/[^\\$]/ s/.*/#\0/' $preseed
+$sed "s#(^d-i time/zone string US/).*#\1Pacific#" $preseed
+$sed '/^xserver-xorg/,/[^\\$]/ s/.*/#\0/' $preseed
# we set the locale in kernel args. maybe we don't need to. this overrides it.
-sed -ri 's!^d-i[[:space:]]debian-installer/locale[[:space:]].*!#\0!' $preseed
+$sed 's!^d-i[[:space:]]debian-installer/locale[[:space:]].*!#\0!' $preseed
# for secure pass, set the shadow option with mkpasswd -s -m sha-512 < passfile