Skip to content

Commit

Permalink
firstboot: execute /boot/firstboot when booting for the first time
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmide committed Oct 20, 2020
1 parent c213dc6 commit 605b902
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions debian/raspberrypi-sys-mods.firstboot.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This unit is heavily inspired by Ned McClain's ideas found in https://github.com/nmcclain/raspberian-firstboot
[Unit]
Description=Firstboot initialization
Documentation=https://github.com/nmcclain/raspberian-firstboot
After=network.target
Before=rc-local.service
ConditionFileNotEmpty=/boot/firstboot

[Service]
ExecStart=/boot/firstboot
ExecStartPost=/bin/mv /boot/firstboot /boot/firstboot.${INVOCATION_ID}
Type=oneshot
RemainAfterExit=no

[Install]
WantedBy=multi-user.target
3 changes: 3 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,22 @@ include /usr/share/dpkg/default.mk
override_dh_installinit:
dh_installinit --name=rpi-display-backlight --no-stop-on-upgrade --no-start
dh_installinit --name=sshswitch
dh_installinit --name=firstboot
dh_installinit --name=apply_noobs_os_config --no-stop-on-upgrade --no-start
dh_installinit --name=regenerate_ssh_host_keys --no-stop-on-upgrade --no-start
dh_installinit --name=wifi-country --no-stop-on-upgrade --no-start

override_dh_systemd_enable:
dh_systemd_enable --name=rpi-display-backlight
dh_systemd_enable --name=sshswitch
dh_systemd_enable --name=firstboot
dh_systemd_enable --name=apply_noobs_os_config --no-enable
dh_systemd_enable --name=regenerate_ssh_host_keys --no-enable
dh_systemd_enable --name=wifi-country

override_dh_systemd_start:
dh_systemd_start --name=sshswitch --no-start
dh_systemd_start --name=firstboot --no-start
dh_systemd_start --name=apply_noobs_os_config --no-start
dh_systemd_start --name=regenerate_ssh_host_keys --no-start
dh_systemd_start --name=wifi-country --no-start

0 comments on commit 605b902

Please sign in to comment.