You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

56 lines
2.7 KiB

  1. # Commands to run at casper boot:
  2. # - Regenerate SSH keys
  3. # - Append /etc/hosts.nilm to /etc/hosts
  4. #
  5. # And the following hacks, which could also run in customize-inner.sh,
  6. # but doing them here ensures that they'll only be present during the
  7. # LiveCD session
  8. # - Append some stuff to /etc/enviroment that's needed for Ubiquity to
  9. # create the initial user properly, when we've already created it.
  10. # - Hack Ubiquity to prevent changing the username, and to set
  11. # a default password
  12. d-i preseed/early_command string \
  13. echo "early_command running" ; \
  14. chroot /root sh -c "rm -f /etc/ssh/ssh_host_*" ; \
  15. chroot /root sh -c "dpkg-reconfigure openssh-server" ; \
  16. cat /root/etc/hosts.nilm >> /root/etc/hosts ; \
  17. echo OVERRIDE_SYSTEM_USER=1 >> /root/etc/environment ; \
  18. sed -i \
  19. -e 's@id="login_encrypt">@id="login_encrypt"><property name="sensitive">False</property>@g' \
  20. -e 's@id="fullname">@id="fullname"><property name="sensitive">False</property>@g' \
  21. -e 's@id="username">@id="username"><property name="sensitive">False</property>@g' \
  22. -e 's@"visibility">False@"visibility">True@g' \
  23. -e 's@id="password">@id="password"><property name="text">nilm</property>@g' \
  24. -e 's@id="verified_password">@id="verified_password"><property name="text">nilm</property>@g' \
  25. /root/usr/share/ubiquity/gtk/stepUserInfo.ui ; \
  26. echo "early_command done"
  27. # chroot /root sh -c "echo UBIQUITY_AUTOMATIC=1 >> /etc/environment"
  28. # Commands to run on successful install:
  29. # (Ubiquity doesn't actually use preseed/late_command, so we do it
  30. # in ubiquity/success_command (which needs things mounted))
  31. # - Remove "quiet splash" from grub command line
  32. # - Append /etc/hosts.nilm to /etc/hosts
  33. ubiquity ubiquity/success_command string \
  34. echo "success_command running" >/target/var/log/installer/postinst.log; \
  35. mount --bind /dev /target/dev ; \
  36. in-target sh -c "sed -i -e 's/quiet splash//g' /etc/default/grub" ; \
  37. in-target sh -c "update-grub >>/var/log/installer/postinst.log 2>&1" ; \
  38. in-target sh -c "cat /etc/hosts.nilm >> /etc/hosts " ; \
  39. umount /target/dev ; \
  40. echo "success_command done" >>/target/var/log/installer/postinst.log
  41. ubiquity ubiquity/use_nonfree boolean true
  42. # Default user. Ubiquity should let them change this.
  43. # (To skip the dialog completely, set the first 4, and put
  44. # UBIQUITY_AUTOMATIC in /etc/environment in early_command above)
  45. d-i passwd/user-fullname string NILM User
  46. d-i passwd/username string nilm
  47. #d-i passwd/user-password password nilm
  48. #d-i passwd/user-password-again password nilm
  49. d-i user-setup/allow-password-weak boolean true
  50. d-i user-setup/force-encrypt-home boolean false
  51. d-i user-setup/encrypt-home boolean false
  52. d-i passwd/auto-login boolean true