Only set up oem-config if the user doesn't already exist

canary-build
William Wilson 2 years ago
parent b3641074f1
commit a52543341c

4
debian/changelog vendored

@ -1,5 +1,6 @@
livecd-rootfs (2.818) UNRELEASED; urgency=medium livecd-rootfs (2.818) UNRELEASED; urgency=medium
[ Dave Jones ]
* raspi: drop mkswap.service and swapfile.swap units in * raspi: drop mkswap.service and swapfile.swap units in
099-ubuntu-image-customization.chroot in favour of units provided by 099-ubuntu-image-customization.chroot in favour of units provided by
ubuntu-raspi-settings-desktop ubuntu-raspi-settings-desktop
@ -8,6 +9,9 @@ livecd-rootfs (2.818) UNRELEASED; urgency=medium
* raspi: drop growfs option from fstab in favour of growroot-almost * raspi: drop growfs option from fstab in favour of growroot-almost
service provided by ubuntu-raspi-settings-desktop service provided by ubuntu-raspi-settings-desktop
[ William 'jawn-smith' Wilson ]
* Skip oem-config setup in hooks if the oem user already exists.
-- Dave Jones <dave.jones@canonical.com> Tue, 28 Mar 2023 14:38:55 +0100 -- Dave Jones <dave.jones@canonical.com> Tue, 28 Mar 2023 14:38:55 +0100
livecd-rootfs (2.817) lunar; urgency=medium livecd-rootfs (2.817) lunar; urgency=medium

@ -11,7 +11,13 @@ if [ "$IMAGEFORMAT" == "none" ]; then
touch /var/log/syslog touch /var/log/syslog
chown syslog:adm /var/log/syslog chown syslog:adm /var/log/syslog
# Create the oem user account # Create the oem user account only if it doesn't already exist
if ! id "oem" &>/dev/null; then
/usr/sbin/useradd -d /home/oem -G adm,sudo -m -N -u 29999 oem
/usr/sbin/oem-config-prepare --quiet
touch "/var/lib/oem-config/run"
fi
/usr/sbin/useradd -d /home/oem -G adm,sudo -m -N -u 29999 oem /usr/sbin/useradd -d /home/oem -G adm,sudo -m -N -u 29999 oem
/usr/sbin/oem-config-prepare --quiet /usr/sbin/oem-config-prepare --quiet

Loading…
Cancel
Save