2020-10-01 11:23:28 +02:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
|
|
|
. /root/config/chroot
|
|
|
|
|
|
|
|
# Specific ubuntu-image chroot configuration goes here.
|
2020-10-07 13:04:49 +02:00
|
|
|
if [ "$IMAGEFORMAT" == "none" ]; then
|
2020-10-01 11:23:28 +02:00
|
|
|
if [ "$SUBPROJECT" == "desktop-preinstalled" ]; then
|
|
|
|
# Create files/dirs Ubiquity requires
|
|
|
|
mkdir -p /var/log/installer
|
|
|
|
touch /var/log/installer/debug
|
|
|
|
touch /var/log/syslog
|
|
|
|
chown syslog:adm /var/log/syslog
|
|
|
|
|
|
|
|
# Create the oem user account
|
2020-10-20 17:26:40 +02:00
|
|
|
/usr/sbin/useradd -d /home/oem -G adm,sudo -m -N -u 29999 oem
|
2020-10-01 11:23:28 +02:00
|
|
|
|
|
|
|
/usr/sbin/oem-config-prepare --quiet
|
|
|
|
touch "/var/lib/oem-config/run"
|
|
|
|
|
|
|
|
# Make the writable partition grow
|
|
|
|
echo "LABEL=writable / ext4 defaults,x-systemd.growfs 0 0" >>/etc/fstab
|
2020-10-14 15:09:34 +02:00
|
|
|
|
|
|
|
# Create a 1GB swapfile
|
2020-10-15 11:44:26 +02:00
|
|
|
dd if=/dev/zero of=/swapfile bs=1G count=1
|
2020-10-14 15:09:34 +02:00
|
|
|
chmod 0600 /swapfile
|
|
|
|
mkswap /swapfile
|
|
|
|
|
|
|
|
echo "/swapfile none swap sw 0 0" >>/etc/fstab
|
2020-10-01 11:23:28 +02:00
|
|
|
fi
|
|
|
|
fi
|