Install and enable set-sysconf

This commit is contained in:
Gunnar Wolf 2019-07-19 12:14:51 -03:00
parent 8ae45e43de
commit 2075ce2a4a
4 changed files with 19 additions and 16 deletions

View File

@ -96,6 +96,12 @@ steps:
install -m 644 -o root -g root eth0 "${ROOT?}/etc/network/interfaces.d/eth0"
install -m 755 -o root -g root set-sysconf "${ROOT?}/usr/local/sbin/set-sysconf"
install -m 644 -o root -g root set-sysconf.service "${ROOT?}/etc/systemd/system"
install -m 644 -o root -g root sysconf.txt "${ROOT?}/boot/firmware/sysconf.txt"
mkdir -p "${ROOT?}/etc/systemd/system/basic.target.requires/"
ln -s /etc/systemd/system/set-sysconf.service "${ROOT?}/etc/systemd/system/basic.target.requires/set-sysconf.service"
install -m 755 -o root -g root rpi-resizerootfs "${ROOT?}/usr/sbin/rpi-resizerootfs"
install -m 644 -o root -g root rpi-resizerootfs.service "${ROOT?}/etc/systemd/system"
mkdir -p "${ROOT?}/etc/systemd/system/systemd-remount-fs.service.requires/"
@ -107,11 +113,6 @@ steps:
rm -f ${ROOT?}/etc/ssh/ssh_host_*_key*
cp "${ROOT?}/usr/lib/linux-image-4.19.0.5-rpi/bcm2835-rpi-zero-w.dtb" "${ROOT?}/boot/"
cat >> "${ROOT?}/etc/motd" <<'EOT'
Please change the root password by running passwd
EOT
root-fs: /
# Clean up archive cache (likely not useful) and lists (likely outdated) to

View File

@ -94,6 +94,12 @@ steps:
install -m 644 -o root -g root eth0 "${ROOT?}/etc/network/interfaces.d/eth0"
install -m 755 -o root -g root set-sysconf "${ROOT?}/usr/local/sbin/set-sysconf"
install -m 644 -o root -g root set-sysconf.service "${ROOT?}/etc/systemd/system"
install -m 644 -o root -g root sysconf.txt "${ROOT?}/boot/firmware/sysconf.txt"
mkdir -p "${ROOT?}/etc/systemd/system/basic.target.requires/"
ln -s /etc/systemd/system/set-sysconf.service "${ROOT?}/etc/systemd/system/basic.target.requires/set-sysconf.service"
install -m 755 -o root -g root rpi-resizerootfs "${ROOT?}/usr/sbin/rpi-resizerootfs"
install -m 644 -o root -g root rpi-resizerootfs.service "${ROOT?}/etc/systemd/system"
mkdir -p "${ROOT?}/etc/systemd/system/systemd-remount-fs.service.requires/"
@ -105,11 +111,6 @@ steps:
rm -f ${ROOT?}/etc/ssh/ssh_host_*_key*
wget https://github.com/raspberrypi/firmware/blob/master/boot/bcm2709-rpi-2-b.dtb -O "${ROOT?}/boot/bcm2708-rpi-2-b.dtb"
cat >> "${ROOT?}/etc/motd" <<'EOT'
Please change the root password by running passwd
EOT
root-fs: /
# Clean up archive cache (likely not useful) and lists (likely outdated) to

View File

@ -96,6 +96,12 @@ steps:
install -m 644 -o root -g root eth0 "${ROOT?}/etc/network/interfaces.d/eth0"
install -m 755 -o root -g root set-sysconf "${ROOT?}/usr/local/sbin/set-sysconf"
install -m 644 -o root -g root set-sysconf.service "${ROOT?}/etc/systemd/system"
install -m 644 -o root -g root sysconf.txt "${ROOT?}/boot/firmware/sysconf.txt"
mkdir -p "${ROOT?}/etc/systemd/system/basic.target.requires/"
ln -s /etc/systemd/system/set-sysconf.service "${ROOT?}/etc/systemd/system/basic.target.requires/set-sysconf.service"
install -m 755 -o root -g root rpi-resizerootfs "${ROOT?}/usr/sbin/rpi-resizerootfs"
install -m 644 -o root -g root rpi-resizerootfs.service "${ROOT?}/etc/systemd/system"
mkdir -p "${ROOT?}/etc/systemd/system/systemd-remount-fs.service.requires/"
@ -105,11 +111,6 @@ steps:
mkdir -p "${ROOT?}/etc/systemd/system/multi-user.target.requires/"
ln -s /etc/systemd/system/rpi-generate-ssh-host-keys.service "${ROOT?}/etc/systemd/system/multi-user.target.requires/rpi-generate-ssh-host-keys.service"
rm -f ${ROOT?}/etc/ssh/ssh_host_*_key*
cat >> "${ROOT?}/etc/motd" <<'EOT'
Please change the root password by running passwd
EOT
root-fs: /
# Clean up archive cache (likely not useful) and lists (likely outdated) to

View File

@ -3,7 +3,7 @@ Description=Set up system configuration
[Service]
Type=oneshot
ExecStart=/usr/sbin/set-sysconf
ExecStart=/usr/local/sbin/set-sysconf
ExecStart=/bin/systemctl --no-reload disable %n
[Install]