[issue #25] fix fstab lines, comment unused options
This commit is contained in:
parent
a81bb54408
commit
fe52e877c8
1 changed files with 58 additions and 56 deletions
|
|
@ -70,59 +70,59 @@ SYS_TYPES=(Pi\ 3\ /\ Pi\ Zero\ W All\ other\ models)
|
||||||
WATCHDOG_MODULES=(bcm2835_wdog bcm2708_wdog)
|
WATCHDOG_MODULES=(bcm2835_wdog bcm2708_wdog)
|
||||||
OPTION_NAMES=(NO YES)
|
OPTION_NAMES=(NO YES)
|
||||||
|
|
||||||
echo -n "Enable boot-time read/write jumper? [y/N] "
|
# echo -n "Enable boot-time read/write jumper? [y/N] "
|
||||||
read
|
# read
|
||||||
if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
# if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
||||||
INSTALL_RW_JUMPER=1
|
# INSTALL_RW_JUMPER=1
|
||||||
echo -n "GPIO pin for R/W jumper: "
|
# echo -n "GPIO pin for R/W jumper: "
|
||||||
read
|
# read
|
||||||
RW_PIN=$REPLY
|
# RW_PIN=$REPLY
|
||||||
fi
|
# fi
|
||||||
|
#
|
||||||
echo -n "Install GPIO-halt utility? [y/N] "
|
# echo -n "Install GPIO-halt utility? [y/N] "
|
||||||
read
|
# read
|
||||||
if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
# if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
||||||
INSTALL_HALT=1
|
# INSTALL_HALT=1
|
||||||
echo -n "GPIO pin for halt button: "
|
# echo -n "GPIO pin for halt button: "
|
||||||
read
|
# read
|
||||||
HALT_PIN=$REPLY
|
# HALT_PIN=$REPLY
|
||||||
fi
|
# fi
|
||||||
|
#
|
||||||
echo -n "Enable kernel panic watchdog? [y/N] "
|
# echo -n "Enable kernel panic watchdog? [y/N] "
|
||||||
read
|
# read
|
||||||
if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
# if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
||||||
INSTALL_WATCHDOG=1
|
# INSTALL_WATCHDOG=1
|
||||||
echo "Target system type:"
|
# echo "Target system type:"
|
||||||
selectN "${SYS_TYPES[0]}" \
|
# selectN "${SYS_TYPES[0]}" \
|
||||||
"${SYS_TYPES[1]}"
|
# "${SYS_TYPES[1]}"
|
||||||
WD_TARGET=$?
|
# WD_TARGET=$?
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# VERIFY SELECTIONS BEFORE CONTINUING --------------------------------------
|
# VERIFY SELECTIONS BEFORE CONTINUING --------------------------------------
|
||||||
|
|
||||||
echo
|
# echo
|
||||||
if [ $INSTALL_RW_JUMPER -eq 1 ]; then
|
# if [ $INSTALL_RW_JUMPER -eq 1 ]; then
|
||||||
echo "Boot-time R/W jumper: YES (GPIO$RW_PIN)"
|
# echo "Boot-time R/W jumper: YES (GPIO$RW_PIN)"
|
||||||
else
|
# else
|
||||||
echo "Boot-time R/W jumper: NO"
|
# echo "Boot-time R/W jumper: NO"
|
||||||
fi
|
# fi
|
||||||
if [ $INSTALL_HALT -eq 1 ]; then
|
# if [ $INSTALL_HALT -eq 1 ]; then
|
||||||
echo "Install GPIO-halt: YES (GPIO$HALT_PIN)"
|
# echo "Install GPIO-halt: YES (GPIO$HALT_PIN)"
|
||||||
else
|
# else
|
||||||
echo "Install GPIO-halt: NO"
|
# echo "Install GPIO-halt: NO"
|
||||||
fi
|
# fi
|
||||||
if [ $INSTALL_WATCHDOG -eq 1 ]; then
|
# if [ $INSTALL_WATCHDOG -eq 1 ]; then
|
||||||
echo "Enable watchdog: YES (${SYS_TYPES[WD_TARGET-1]})"
|
# echo "Enable watchdog: YES (${SYS_TYPES[WD_TARGET-1]})"
|
||||||
else
|
# else
|
||||||
echo "Enable watchdog: NO"
|
# echo "Enable watchdog: NO"
|
||||||
fi
|
# fi
|
||||||
echo
|
# echo
|
||||||
echo -n "CONTINUE? [y/N] "
|
# echo -n "CONTINUE? [y/N] "
|
||||||
read
|
# read
|
||||||
if [[ ! "$REPLY" =~ ^(yes|y|Y)$ ]]; then
|
# if [[ ! "$REPLY" =~ ^(yes|y|Y)$ ]]; then
|
||||||
echo "Canceled."
|
# echo "Canceled."
|
||||||
exit 0
|
# exit 0
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
# START INSTALL ------------------------------------------------------------
|
# START INSTALL ------------------------------------------------------------
|
||||||
# All selections have been validated at this point...
|
# All selections have been validated at this point...
|
||||||
|
|
@ -214,12 +214,14 @@ ln -s /tmp/dhcpcd.resolv.conf /etc/resolv.conf
|
||||||
# tmpfs /tmp tmpfs nodev,nosuid 0 0
|
# tmpfs /tmp tmpfs nodev,nosuid 0 0
|
||||||
replace /etc/fstab "vfat\s*defaults\s" "vfat defaults,ro "
|
replace /etc/fstab "vfat\s*defaults\s" "vfat defaults,ro "
|
||||||
replace /etc/fstab "ext4\s*defaults,noatime\s" "ext4 defaults,noatime,ro "
|
replace /etc/fstab "ext4\s*defaults,noatime\s" "ext4 defaults,noatime,ro "
|
||||||
append1 /etc/fstab "/var/log" "tmpfs /var/log tmpfs nodev,nosuid 0 0"
|
cat << EOF >> /etc/fstab
|
||||||
append1 /etc/fstab "/var/tmp" "tmpfs /var/tmp tmpfs nodev,nosuid 0 0"
|
tmpfs /var/log tmpfs nodev,nosuid 0 0
|
||||||
append1 /etc/fstab "/var/lib/ntp" "tmpfs /var/tmp tmpfs nodev,nosuid 0 0"
|
tmpfs /var/tmp tmpfs nodev,nosuid 0 0
|
||||||
append1 /etc/fstab "/var/lib/pyheatpump" "tmpfs /var/tmp tmpfs nodev,nosuid 0 0"
|
tmpfs /var/lib/ntp tmpfs nodev,nosuid 0 0
|
||||||
append1 /etc/fstab "/run" "tmpfs /var/run tmpfs nodev,nosuid 0 0"
|
tmpfs /var/lib/pyheatpump tmpfs nodev,nosuid 0 0
|
||||||
append1 /etc/fstab "\s/tmp" "tmpfs /tmp tmpfs nodev,nosuid 0 0"
|
tmpfs /var/run tmpfs nodev,nosuid 0 0
|
||||||
|
tmpfs /tmp tmpfs nodev,nosuid 0 0
|
||||||
|
EOF
|
||||||
|
|
||||||
# PROMPT FOR REBOOT --------------------------------------------------------
|
# PROMPT FOR REBOOT --------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue