mirror of
git://soft.sys114.com/odroid-stamper
synced 2025-12-19 00:18:42 +09:00
Signed-off-by: Dongjin Kim <tobetter@gmail.com> Change-Id: Id40294fcc24e37286ef131aaea24200a56f59e53
32 lines
710 B
Bash
Executable File
32 lines
710 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -f /root/firstboot.sh ]; then
|
|
chmod +x /root/firstboot.sh
|
|
chown root:root /root/firstboot.sh
|
|
|
|
sed -i "s,@@UUID_BOOTFS@@,@@DEFAULT_DEV_BOOT@@,g" /root/firstboot.sh
|
|
sed -i "s,@@UUID_ROOTFS@@,@@DEFAULT_DEV_ROOTFS@@,g" /root/firstboot.sh
|
|
fi
|
|
|
|
cat <<__EOF | tee -a /lib/systemd/system/firstboot.service >/dev/null
|
|
[Unit]
|
|
Description=FirstBoot
|
|
After=network.target
|
|
Before=rc-local.service
|
|
ConditionFileNotEmpty=/root/firstboot.sh
|
|
|
|
[Service]
|
|
ExecStart=/root/firstboot.sh
|
|
ExecStartPost=/bin/mv /root/firstboot.sh /root/firstboot.sh.done
|
|
Type=oneshot
|
|
RemainAfterExit=no
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
__EOF
|
|
|
|
systemctl enable firstboot.service
|
|
systemctl disable ondemand
|
|
|
|
systemctl disable ssh
|