Browse Source

[issue #25] fix fstab lines, comment unused options

Maxime Alves LIRMM@home 3 years ago
parent
commit
fe52e877c8
1 changed files with 58 additions and 56 deletions
  1. 58
    56
      config/read-only-fs.sh

+ 58
- 56
config/read-only-fs.sh View File

@@ -70,59 +70,59 @@ SYS_TYPES=(Pi\ 3\ /\ Pi\ Zero\ W All\ other\ models)
70 70
 WATCHDOG_MODULES=(bcm2835_wdog bcm2708_wdog)
71 71
 OPTION_NAMES=(NO YES)
72 72
 
73
-echo -n "Enable boot-time read/write jumper? [y/N] "
74
-read
75
-if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
76
-	INSTALL_RW_JUMPER=1
77
-	echo -n "GPIO pin for R/W jumper: "
78
-	read
79
-	RW_PIN=$REPLY
80
-fi
81
-
82
-echo -n "Install GPIO-halt utility? [y/N] "
83
-read
84
-if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
85
-	INSTALL_HALT=1
86
-	echo -n "GPIO pin for halt button: "
87
-	read
88
-	HALT_PIN=$REPLY
89
-fi
90
-
91
-echo -n "Enable kernel panic watchdog? [y/N] "
92
-read
93
-if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
94
-	INSTALL_WATCHDOG=1
95
-	echo "Target system type:"
96
-	selectN "${SYS_TYPES[0]}" \
97
-		"${SYS_TYPES[1]}"
98
-	WD_TARGET=$?
99
-fi
73
+# echo -n "Enable boot-time read/write jumper? [y/N] "
74
+# read
75
+# if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
76
+# 	INSTALL_RW_JUMPER=1
77
+# 	echo -n "GPIO pin for R/W jumper: "
78
+# 	read
79
+# 	RW_PIN=$REPLY
80
+# fi
81
+# 
82
+# echo -n "Install GPIO-halt utility? [y/N] "
83
+# read
84
+# if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
85
+# 	INSTALL_HALT=1
86
+# 	echo -n "GPIO pin for halt button: "
87
+# 	read
88
+# 	HALT_PIN=$REPLY
89
+# fi
90
+# 
91
+# echo -n "Enable kernel panic watchdog? [y/N] "
92
+# read
93
+# if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
94
+# 	INSTALL_WATCHDOG=1
95
+# 	echo "Target system type:"
96
+# 	selectN "${SYS_TYPES[0]}" \
97
+# 		"${SYS_TYPES[1]}"
98
+# 	WD_TARGET=$?
99
+# fi
100 100
 
101 101
 # VERIFY SELECTIONS BEFORE CONTINUING --------------------------------------
102 102
 
103
-echo
104
-if [ $INSTALL_RW_JUMPER -eq 1 ]; then
105
-	echo "Boot-time R/W jumper: YES (GPIO$RW_PIN)"
106
-else
107
-	echo "Boot-time R/W jumper: NO"
108
-fi
109
-if [ $INSTALL_HALT -eq 1 ]; then
110
-	echo "Install GPIO-halt: YES (GPIO$HALT_PIN)"
111
-else
112
-	echo "Install GPIO-halt: NO"
113
-fi
114
-if [ $INSTALL_WATCHDOG -eq 1 ]; then
115
-	echo "Enable watchdog: YES (${SYS_TYPES[WD_TARGET-1]})"
116
-else
117
-	echo "Enable watchdog: NO"
118
-fi
119
-echo
120
-echo -n "CONTINUE? [y/N] "
121
-read
122
-if [[ ! "$REPLY" =~ ^(yes|y|Y)$ ]]; then
123
-	echo "Canceled."
124
-	exit 0
125
-fi
103
+# echo
104
+# if [ $INSTALL_RW_JUMPER -eq 1 ]; then
105
+# 	echo "Boot-time R/W jumper: YES (GPIO$RW_PIN)"
106
+# else
107
+# 	echo "Boot-time R/W jumper: NO"
108
+# fi
109
+# if [ $INSTALL_HALT -eq 1 ]; then
110
+# 	echo "Install GPIO-halt: YES (GPIO$HALT_PIN)"
111
+# else
112
+# 	echo "Install GPIO-halt: NO"
113
+# fi
114
+# if [ $INSTALL_WATCHDOG -eq 1 ]; then
115
+# 	echo "Enable watchdog: YES (${SYS_TYPES[WD_TARGET-1]})"
116
+# else
117
+# 	echo "Enable watchdog: NO"
118
+# fi
119
+# echo
120
+# echo -n "CONTINUE? [y/N] "
121
+# read
122
+# if [[ ! "$REPLY" =~ ^(yes|y|Y)$ ]]; then
123
+# 	echo "Canceled."
124
+# 	exit 0
125
+# fi
126 126
 
127 127
 # START INSTALL ------------------------------------------------------------
128 128
 # All selections have been validated at this point...
@@ -214,12 +214,14 @@ ln -s /tmp/dhcpcd.resolv.conf /etc/resolv.conf
214 214
 # tmpfs /tmp     tmpfs nodev,nosuid 0 0
215 215
 replace /etc/fstab "vfat\s*defaults\s" "vfat    defaults,ro "
216 216
 replace /etc/fstab "ext4\s*defaults,noatime\s" "ext4    defaults,noatime,ro "
217
-append1 /etc/fstab "/var/log" "tmpfs /var/log tmpfs nodev,nosuid 0 0"
218
-append1 /etc/fstab "/var/tmp" "tmpfs /var/tmp tmpfs nodev,nosuid 0 0"
219
-append1 /etc/fstab "/var/lib/ntp" "tmpfs /var/tmp tmpfs nodev,nosuid 0 0"
220
-append1 /etc/fstab "/var/lib/pyheatpump" "tmpfs /var/tmp tmpfs nodev,nosuid 0 0"
221
-append1 /etc/fstab "/run" "tmpfs /var/run tmpfs nodev,nosuid 0 0"
222
-append1 /etc/fstab "\s/tmp"   "tmpfs /tmp    tmpfs nodev,nosuid 0 0"
217
+cat << EOF >> /etc/fstab
218
+tmpfs /var/log tmpfs nodev,nosuid 0 0
219
+tmpfs /var/tmp tmpfs nodev,nosuid 0 0
220
+tmpfs /var/lib/ntp tmpfs nodev,nosuid 0 0
221
+tmpfs /var/lib/pyheatpump tmpfs nodev,nosuid 0 0
222
+tmpfs /var/run tmpfs nodev,nosuid 0 0
223
+tmpfs /tmp tmpfs nodev,nosuid 0 0
224
+EOF
223 225
 
224 226
 # PROMPT FOR REBOOT --------------------------------------------------------
225 227
 

Loading…
Cancel
Save