2016-07-01 17:28:07 -04:00
|
|
|
# Commands to run at casper boot:
|
|
|
|
# - Regenerate SSH keys
|
|
|
|
# - Append /etc/hosts.nilm to /etc/hosts
|
2016-07-03 02:07:24 -04:00
|
|
|
#
|
|
|
|
# And the following hacks, which could also run in customize-inner.sh,
|
|
|
|
# but doing them here ensures that they'll only be present during the
|
|
|
|
# LiveCD session
|
2016-07-03 00:18:59 -04:00
|
|
|
# - Append some stuff to /etc/enviroment that's needed for Ubiquity to
|
|
|
|
# create the initial user properly, when we've already created it.
|
2016-07-03 02:07:24 -04:00
|
|
|
# - Hack Ubiquity to prevent changing the username, and to set
|
|
|
|
# a default password
|
2016-07-01 17:28:07 -04:00
|
|
|
d-i preseed/early_command string \
|
|
|
|
echo "early_command running" ; \
|
|
|
|
chroot /root sh -c "rm -f /etc/ssh/ssh_host_*" ; \
|
|
|
|
chroot /root sh -c "dpkg-reconfigure openssh-server" ; \
|
2016-07-03 02:07:24 -04:00
|
|
|
cat /root/etc/hosts.nilm >> /root/etc/hosts ; \
|
|
|
|
echo OVERRIDE_SYSTEM_USER=1 >> /root/etc/environment ; \
|
|
|
|
sed -i \
|
|
|
|
-e 's@id="login_encrypt">@id="login_encrypt"><property name="sensitive">False</property>@g' \
|
|
|
|
-e 's@id="fullname">@id="fullname"><property name="sensitive">False</property>@g' \
|
|
|
|
-e 's@id="username">@id="username"><property name="sensitive">False</property>@g' \
|
|
|
|
-e 's@"visibility">False@"visibility">True@g' \
|
|
|
|
-e 's@id="password">@id="password"><property name="text">nilm</property>@g' \
|
|
|
|
-e 's@id="verified_password">@id="verified_password"><property name="text">nilm</property>@g' \
|
|
|
|
/root/usr/share/ubiquity/gtk/stepUserInfo.ui ; \
|
2016-07-01 17:28:07 -04:00
|
|
|
echo "early_command done"
|
2016-07-03 02:07:24 -04:00
|
|
|
# chroot /root sh -c "echo UBIQUITY_AUTOMATIC=1 >> /etc/environment"
|
2016-07-01 17:28:07 -04:00
|
|
|
|
|
|
|
# Commands to run on successful install:
|
|
|
|
# (Ubiquity doesn't actually use preseed/late_command, so we do it
|
|
|
|
# in ubiquity/success_command (which needs things mounted))
|
|
|
|
# - Remove "quiet splash" from grub command line
|
|
|
|
# - Append /etc/hosts.nilm to /etc/hosts
|
|
|
|
ubiquity ubiquity/success_command string \
|
|
|
|
echo "success_command running" >/target/var/log/installer/postinst.log; \
|
|
|
|
mount --bind /dev /target/dev ; \
|
|
|
|
in-target sh -c "sed -i -e 's/quiet splash//g' /etc/default/grub" ; \
|
|
|
|
in-target sh -c "update-grub >>/var/log/installer/postinst.log 2>&1" ; \
|
|
|
|
in-target sh -c "cat /etc/hosts.nilm >> /etc/hosts " ; \
|
|
|
|
umount /target/dev ; \
|
|
|
|
echo "success_command done" >>/target/var/log/installer/postinst.log
|
|
|
|
|
2016-07-03 00:18:59 -04:00
|
|
|
ubiquity ubiquity/use_nonfree boolean true
|
|
|
|
|
2016-07-01 17:28:07 -04:00
|
|
|
# Default user. Ubiquity should let them change this.
|
2016-07-03 00:18:59 -04:00
|
|
|
# (To skip the dialog completely, set the first 4, and put
|
|
|
|
# UBIQUITY_AUTOMATIC in /etc/environment in early_command above)
|
2016-07-01 17:28:07 -04:00
|
|
|
d-i passwd/user-fullname string NILM User
|
|
|
|
d-i passwd/username string nilm
|
2016-07-03 02:07:24 -04:00
|
|
|
#d-i passwd/user-password password nilm
|
|
|
|
#d-i passwd/user-password-again password nilm
|
2016-07-01 17:28:07 -04:00
|
|
|
d-i user-setup/allow-password-weak boolean true
|
2016-07-03 00:18:59 -04:00
|
|
|
d-i user-setup/force-encrypt-home boolean false
|
|
|
|
d-i user-setup/encrypt-home boolean false
|
2016-07-01 17:28:07 -04:00
|
|
|
d-i passwd/auto-login boolean true
|
2020-08-07 16:41:10 -04:00
|
|
|
|
|
|
|
d-i netcfg/get_hostname seen true
|
|
|
|
d-i netcfg/get_hostname string nilmbuntu
|