@@ -8,24 +8,24 | |||||
8 | # Prepare rc.firstboot script |
|
8 | # Prepare rc.firstboot script | |
9 | cat files/firstboot/10-begin.sh > "${ETC_DIR}/rc.firstboot" |
|
9 | cat files/firstboot/10-begin.sh > "${ETC_DIR}/rc.firstboot" | |
10 |
|
10 | |||
11 | # Ensure openssh server host keys are regenerated on first boot |
|
|||
12 | if [ "$ENABLE_SSHD" = true ] ; then |
|
|||
13 | cat files/firstboot/20-generate-ssh-keys.sh >> "${ETC_DIR}/rc.firstboot" |
|
|||
14 | fi |
|
|||
15 |
|
||||
16 | # Prepare filesystem auto expand |
|
11 | # Prepare filesystem auto expand | |
17 | if [ "$EXPANDROOT" = true ] ; then |
|
12 | if [ "$EXPANDROOT" = true ] ; then | |
18 | if [ "$ENABLE_CRYPTFS" = false ] ; then |
|
13 | if [ "$ENABLE_CRYPTFS" = false ] ; then | |
19 |
cat files/firstboot/ |
|
14 | cat files/firstboot/20-expandroot.sh >> "${ETC_DIR}/rc.firstboot" | |
20 |
|
||||
21 | # Restart dphys-swapfile so the size of the swap file is relative to the resized root partition |
|
|||
22 | if [ "$ENABLE_DPHYSSWAP" = true ] ; then |
|
|||
23 | cat files/firstboot/31-restart-dphys-swapfile.sh >> "${ETC_DIR}/rc.firstboot" |
|
|||
24 | fi |
|
|||
25 | else |
|
15 | else | |
26 | # Regenerate initramfs to remove encrypted root partition auto expand |
|
16 | # Regenerate initramfs to remove encrypted root partition auto expand | |
27 |
cat files/firstboot/ |
|
17 | cat files/firstboot/21-regenerate-initramfs.sh >> "${ETC_DIR}/rc.firstboot" | |
28 | fi |
|
18 | fi | |
|
19 | ||||
|
20 | # Restart dphys-swapfile so the size of the swap file is relative to the resized root partition | |||
|
21 | if [ "$ENABLE_DPHYSSWAP" = true ] ; then | |||
|
22 | cat files/firstboot/23-restart-dphys-swapfile.sh >> "${ETC_DIR}/rc.firstboot" | |||
|
23 | fi | |||
|
24 | fi | |||
|
25 | ||||
|
26 | # Ensure openssh server host keys are regenerated on first boot | |||
|
27 | if [ "$ENABLE_SSHD" = true ] ; then | |||
|
28 | cat files/firstboot/30-generate-ssh-keys.sh >> "${ETC_DIR}/rc.firstboot" | |||
29 | fi |
|
29 | fi | |
30 |
|
30 | |||
31 | # Ensure that dbus machine-id exists |
|
31 | # Ensure that dbus machine-id exists |
@@ -66,11 +66,3 EOF2 | |||||
66 | partprobe && |
|
66 | partprobe && | |
67 | resize2fs /dev/${ROOT_PART} && |
|
67 | resize2fs /dev/${ROOT_PART} && | |
68 | logger -t "rc.firstboot" "Root partition successfully resized." |
|
68 | logger -t "rc.firstboot" "Root partition successfully resized." | |
69 |
|
||||
70 | # Restart dphys-swapfile service if it exists |
|
|||
71 | if systemctl list-units | grep -q dphys-swapfile ; then |
|
|||
72 | if systemctl is-enabled dphys-swapfile ; then |
|
|||
73 | logger -t "rc.firstboot" "Restarting dphys-swapfile" |
|
|||
74 | systemctl restart dphys-swapfile |
|
|||
75 | fi |
|
|||
76 | fi |
|
1 | NO CONTENT: file renamed from files/firstboot/33-regenerate-initramfs.sh to files/firstboot/21-regenerate-initramfs.sh |
|
NO CONTENT: file renamed from files/firstboot/33-regenerate-initramfs.sh to files/firstboot/21-regenerate-initramfs.sh |
@@ -1,5 +1,7 | |||||
1 | logger -t "rc.firstboot" "Restarting dphys-swapfile" |
|
1 | # Restart dphys-swapfile service if it exists | |
|
2 | if systemctl list-units | grep -q dphys-swapfile ; then | |||
|
3 | logger -t "rc.firstboot" "Restarting dphys-swapfile" | |||
2 |
|
4 | |||
3 |
|
|
5 | systemctl enable dphys-swapfile | |
4 | systemctl restart dphys-swapfile |
|
6 | systemctl restart dphys-swapfile | |
5 | fi |
|
7 | fi |
1 | NO CONTENT: file renamed from files/firstboot/20-generate-ssh-keys.sh to files/firstboot/30-generate-ssh-keys.sh |
|
NO CONTENT: file renamed from files/firstboot/20-generate-ssh-keys.sh to files/firstboot/30-generate-ssh-keys.sh |
General Comments 0
Vous devez vous connecter pour laisser un commentaire.
Se connecter maintenant