|
|
@@ -8,27 +8,13 @@ fi |
|
|
|
set -e |
|
|
|
set -x |
|
|
|
|
|
|
|
# Set up live username and hostname |
|
|
|
cat >/etc/casper.conf <<"EOF" |
|
|
|
export USERNAME="nilm" |
|
|
|
export USERFULLNAME="NILM User" |
|
|
|
export HOST="nilmbuntu" |
|
|
|
export BUILD_SYSTEM="Ubuntu" |
|
|
|
export FLAVOUR="NILMbuntu" |
|
|
|
|
|
|
|
# Do the inital user setup even though UID 1000 already exists. |
|
|
|
# This also needs to be set in /etc/environment, for ubiquity, |
|
|
|
# but we do that in preseed/early_command so that it only shows |
|
|
|
# up in the LiveCD image. |
|
|
|
export OVERRIDE_SYSTEM_USER=true |
|
|
|
EOF |
|
|
|
# Move stuff to the right places |
|
|
|
install -D -m 0644 files/nilmbuntu.png /usr/share/xfce4/backdrops/nilmbuntu.png |
|
|
|
install -D -m 0644 files/fallback_dns.conf /etc/systemd/resolved.conf.d/fallback_dns.conf |
|
|
|
install -D -m 0644 files/casper.conf /etc/casper.conf |
|
|
|
install -D -m 0644 files/hosts.nilm /etc/hosts.nilm |
|
|
|
|
|
|
|
# Set up NILM-specific stuff to get added to /etc/hosts after installation |
|
|
|
cat >/etc/hosts.nilm <<"EOF" |
|
|
|
127.0.2.1 nilm.primary |
|
|
|
127.0.2.2 nilm.secondary |
|
|
|
EOF |
|
|
|
# And copy it for now (although it will get overwritten at boot) |
|
|
|
# Copy hosts for now (although it will get overwritten at boot) |
|
|
|
cat /etc/hosts.nilm >> /etc/hosts |
|
|
|
|
|
|
|
# Upgrade packages |
|
|
@@ -170,7 +156,7 @@ fi |
|
|
|
# Manipulate some config files to avoid host stuff leaking through. |
|
|
|
echo 'RESUME=none' > /etc/initramfs-tools/conf.d/resume |
|
|
|
mv /etc/crypttab /etc/crypttab-old |
|
|
|
update-initramfs -u |
|
|
|
CASPER_GENERATE_UUID=1 update-initramfs -u |
|
|
|
rm /etc/initramfs-tools/conf.d/resume |
|
|
|
mv /etc/crypttab-old /etc/crypttab |
|
|
|
|