##// END OF EJS Templates
Added ENABLE_SWAP...
Yannick Schinko -
r520:4faf10532824
parent child
Show More
@@ -0,0 +1,5
1 logger -t "rc.firstboot" "Restarting dphys-swapfile"
2
3 if systemctl is-enabled dphys-swapfile ; then
4 systemctl restart dphys-swapfile
5 fi
@@ -93,6 +93,9 Set default system timezone. All available timezones can be found in the `/usr/s
93 ##### `EXPANDROOT`=true
93 ##### `EXPANDROOT`=true
94 Expand the root partition and filesystem automatically on first boot.
94 Expand the root partition and filesystem automatically on first boot.
95
95
96 ##### `ENABLE_SWAP`=true
97 Enable swap. The size of the swapfile is chosen relative to the size of the root partition. It'll use the `dphys-swapfile` package for that.
98
96 ##### `ENABLE_QEMU`=false
99 ##### `ENABLE_QEMU`=false
97 Generate kernel (`vexpress_defconfig`), file system image (`qcow2`) and DTB files that can be used for QEMU full system emulation (`vexpress-A15`). The output files are stored in the `$(pwd)/images/qemu` directory. You can find more information about running the generated image in the QEMU section of this readme file.
100 Generate kernel (`vexpress_defconfig`), file system image (`qcow2`) and DTB files that can be used for QEMU full system emulation (`vexpress-A15`). The output files are stored in the `$(pwd)/images/qemu` directory. You can find more information about running the generated image in the QEMU section of this readme file.
98
101
@@ -10,28 +10,33 cat files/firstboot/10-begin.sh > "${ETC_DIR}/rc.firstboot"
10
10
11 # Ensure openssh server host keys are regenerated on first boot
11 # Ensure openssh server host keys are regenerated on first boot
12 if [ "$ENABLE_SSHD" = true ] ; then
12 if [ "$ENABLE_SSHD" = true ] ; then
13 cat files/firstboot/21-generate-ssh-keys.sh >> "${ETC_DIR}/rc.firstboot"
13 cat files/firstboot/20-generate-ssh-keys.sh >> "${ETC_DIR}/rc.firstboot"
14 fi
14 fi
15
15
16 # Prepare filesystem auto expand
16 # Prepare filesystem auto expand
17 if [ "$EXPANDROOT" = true ] ; then
17 if [ "$EXPANDROOT" = true ] ; then
18 if [ "$ENABLE_CRYPTFS" = false ] ; then
18 if [ "$ENABLE_CRYPTFS" = false ] ; then
19 cat files/firstboot/22-expandroot.sh >> "${ETC_DIR}/rc.firstboot"
19 cat files/firstboot/30-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_SWAP" = true ] ; then
23 cat files/firstboot/31-restart-dphys-swapfile.sh >> "${ETC_DIR}/rc.firstboot"
24 fi
20 else
25 else
21 # Regenerate initramfs to remove encrypted root partition auto expand
26 # Regenerate initramfs to remove encrypted root partition auto expand
22 cat files/firstboot/23-regenerate-initramfs.sh >> "${ETC_DIR}/rc.firstboot"
27 cat files/firstboot/33-regenerate-initramfs.sh >> "${ETC_DIR}/rc.firstboot"
23 fi
28 fi
24 fi
29 fi
25
30
26 # Ensure that dbus machine-id exists
31 # Ensure that dbus machine-id exists
27 cat files/firstboot/24-generate-machineid.sh >> "${ETC_DIR}/rc.firstboot"
32 cat files/firstboot/40-generate-machineid.sh >> "${ETC_DIR}/rc.firstboot"
28
33
29 # Create /etc/resolv.conf symlink
34 # Create /etc/resolv.conf symlink
30 cat files/firstboot/25-create-resolv-symlink.sh >> "${ETC_DIR}/rc.firstboot"
35 cat files/firstboot/41-create-resolv-symlink.sh >> "${ETC_DIR}/rc.firstboot"
31
36
32 # Configure automatic network interface names
37 # Configure automatic network interface names
33 if [ "$ENABLE_IFNAMES" = true ] ; then
38 if [ "$ENABLE_IFNAMES" = true ] ; then
34 cat files/firstboot/26-config-ifnames.sh >> "${ETC_DIR}/rc.firstboot"
39 cat files/firstboot/42-config-ifnames.sh >> "${ETC_DIR}/rc.firstboot"
35 fi
40 fi
36
41
37 # Finalize rc.firstboot script
42 # Finalize rc.firstboot script
1 NO CONTENT: file renamed from files/firstboot/21-generate-ssh-keys.sh to files/firstboot/20-generate-ssh-keys.sh
NO CONTENT: file renamed from files/firstboot/21-generate-ssh-keys.sh to files/firstboot/20-generate-ssh-keys.sh
1 NO CONTENT: file renamed from files/firstboot/22-expandroot.sh to files/firstboot/30-expandroot.sh
NO CONTENT: file renamed from files/firstboot/22-expandroot.sh to files/firstboot/30-expandroot.sh
1 NO CONTENT: file renamed from files/firstboot/23-regenerate-initramfs.sh to files/firstboot/33-regenerate-initramfs.sh
NO CONTENT: file renamed from files/firstboot/23-regenerate-initramfs.sh to files/firstboot/33-regenerate-initramfs.sh
1 NO CONTENT: file renamed from files/firstboot/24-generate-machineid.sh to files/firstboot/40-generate-machineid.sh
NO CONTENT: file renamed from files/firstboot/24-generate-machineid.sh to files/firstboot/40-generate-machineid.sh
1 NO CONTENT: file renamed from files/firstboot/25-create-resolv-symlink.sh to files/firstboot/41-create-resolv-symlink.sh
NO CONTENT: file renamed from files/firstboot/25-create-resolv-symlink.sh to files/firstboot/41-create-resolv-symlink.sh
1 NO CONTENT: file renamed from files/firstboot/26-config-ifnames.sh to files/firstboot/42-config-ifnames.sh
NO CONTENT: file renamed from files/firstboot/26-config-ifnames.sh to files/firstboot/42-config-ifnames.sh
@@ -83,6 +83,7 USER_PASSWORD=${USER_PASSWORD:=raspberry}
83 DEFLOCAL=${DEFLOCAL:="en_US.UTF-8"}
83 DEFLOCAL=${DEFLOCAL:="en_US.UTF-8"}
84 TIMEZONE=${TIMEZONE:="Europe/Berlin"}
84 TIMEZONE=${TIMEZONE:="Europe/Berlin"}
85 EXPANDROOT=${EXPANDROOT:=true}
85 EXPANDROOT=${EXPANDROOT:=true}
86 ENABLE_SWAP=${ENABLE_SWAP:=true}
86
87
87 # Keyboard settings
88 # Keyboard settings
88 XKB_MODEL=${XKB_MODEL:=""}
89 XKB_MODEL=${XKB_MODEL:=""}
@@ -484,6 +485,11 if [ "$EXPANDROOT" = true ] ; then
484 APT_INCLUDES="${APT_INCLUDES},parted"
485 APT_INCLUDES="${APT_INCLUDES},parted"
485 fi
486 fi
486
487
488 # Add dphys-swapfile package, required to enable swap
489 if [ "$ENABLE_SWAP" = true ] ; then
490 APT_INCLUDES="${APT_INCLUDES},dphys-swapfile"
491 fi
492
487 # Add dbus package, recommended if using systemd
493 # Add dbus package, recommended if using systemd
488 if [ "$ENABLE_DBUS" = true ] ; then
494 if [ "$ENABLE_DBUS" = true ] ; then
489 APT_INCLUDES="${APT_INCLUDES},dbus"
495 APT_INCLUDES="${APT_INCLUDES},dbus"
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant