[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)
|
||||
OPTION_NAMES=(NO YES)
|
||||
|
||||
echo -n "Enable boot-time read/write jumper? [y/N] "
|
||||
read
|
||||
if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
||||
INSTALL_RW_JUMPER=1
|
||||
echo -n "GPIO pin for R/W jumper: "
|
||||
read
|
||||
RW_PIN=$REPLY
|
||||
fi
|
||||
|
||||
echo -n "Install GPIO-halt utility? [y/N] "
|
||||
read
|
||||
if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
||||
INSTALL_HALT=1
|
||||
echo -n "GPIO pin for halt button: "
|
||||
read
|
||||
HALT_PIN=$REPLY
|
||||
fi
|
||||
|
||||
echo -n "Enable kernel panic watchdog? [y/N] "
|
||||
read
|
||||
if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
||||
INSTALL_WATCHDOG=1
|
||||
echo "Target system type:"
|
||||
selectN "${SYS_TYPES[0]}" \
|
||||
"${SYS_TYPES[1]}"
|
||||
WD_TARGET=$?
|
||||
fi
|
||||
# echo -n "Enable boot-time read/write jumper? [y/N] "
|
||||
# read
|
||||
# if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
||||
# INSTALL_RW_JUMPER=1
|
||||
# echo -n "GPIO pin for R/W jumper: "
|
||||
# read
|
||||
# RW_PIN=$REPLY
|
||||
# fi
|
||||
#
|
||||
# echo -n "Install GPIO-halt utility? [y/N] "
|
||||
# read
|
||||
# if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
||||
# INSTALL_HALT=1
|
||||
# echo -n "GPIO pin for halt button: "
|
||||
# read
|
||||
# HALT_PIN=$REPLY
|
||||
# fi
|
||||
#
|
||||
# echo -n "Enable kernel panic watchdog? [y/N] "
|
||||
# read
|
||||
# if [[ "$REPLY" =~ (yes|y|Y)$ ]]; then
|
||||
# INSTALL_WATCHDOG=1
|
||||
# echo "Target system type:"
|
||||
# selectN "${SYS_TYPES[0]}" \
|
||||
# "${SYS_TYPES[1]}"
|
||||
# WD_TARGET=$?
|
||||
# fi
|
||||
|
||||
# VERIFY SELECTIONS BEFORE CONTINUING --------------------------------------
|
||||
|
||||
echo
|
||||
if [ $INSTALL_RW_JUMPER -eq 1 ]; then
|
||||
echo "Boot-time R/W jumper: YES (GPIO$RW_PIN)"
|
||||
else
|
||||
echo "Boot-time R/W jumper: NO"
|
||||
fi
|
||||
if [ $INSTALL_HALT -eq 1 ]; then
|
||||
echo "Install GPIO-halt: YES (GPIO$HALT_PIN)"
|
||||
else
|
||||
echo "Install GPIO-halt: NO"
|
||||
fi
|
||||
if [ $INSTALL_WATCHDOG -eq 1 ]; then
|
||||
echo "Enable watchdog: YES (${SYS_TYPES[WD_TARGET-1]})"
|
||||
else
|
||||
echo "Enable watchdog: NO"
|
||||
fi
|
||||
echo
|
||||
echo -n "CONTINUE? [y/N] "
|
||||
read
|
||||
if [[ ! "$REPLY" =~ ^(yes|y|Y)$ ]]; then
|
||||
echo "Canceled."
|
||||
exit 0
|
||||
fi
|
||||
# echo
|
||||
# if [ $INSTALL_RW_JUMPER -eq 1 ]; then
|
||||
# echo "Boot-time R/W jumper: YES (GPIO$RW_PIN)"
|
||||
# else
|
||||
# echo "Boot-time R/W jumper: NO"
|
||||
# fi
|
||||
# if [ $INSTALL_HALT -eq 1 ]; then
|
||||
# echo "Install GPIO-halt: YES (GPIO$HALT_PIN)"
|
||||
# else
|
||||
# echo "Install GPIO-halt: NO"
|
||||
# fi
|
||||
# if [ $INSTALL_WATCHDOG -eq 1 ]; then
|
||||
# echo "Enable watchdog: YES (${SYS_TYPES[WD_TARGET-1]})"
|
||||
# else
|
||||
# echo "Enable watchdog: NO"
|
||||
# fi
|
||||
# echo
|
||||
# echo -n "CONTINUE? [y/N] "
|
||||
# read
|
||||
# if [[ ! "$REPLY" =~ ^(yes|y|Y)$ ]]; then
|
||||
# echo "Canceled."
|
||||
# exit 0
|
||||
# fi
|
||||
|
||||
# START INSTALL ------------------------------------------------------------
|
||||
# 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
|
||||
replace /etc/fstab "vfat\s*defaults\s" "vfat defaults,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"
|
||||
append1 /etc/fstab "/var/tmp" "tmpfs /var/tmp tmpfs nodev,nosuid 0 0"
|
||||
append1 /etc/fstab "/var/lib/ntp" "tmpfs /var/tmp tmpfs nodev,nosuid 0 0"
|
||||
append1 /etc/fstab "/var/lib/pyheatpump" "tmpfs /var/tmp tmpfs nodev,nosuid 0 0"
|
||||
append1 /etc/fstab "/run" "tmpfs /var/run tmpfs nodev,nosuid 0 0"
|
||||
append1 /etc/fstab "\s/tmp" "tmpfs /tmp tmpfs nodev,nosuid 0 0"
|
||||
cat << EOF >> /etc/fstab
|
||||
tmpfs /var/log tmpfs nodev,nosuid 0 0
|
||||
tmpfs /var/tmp tmpfs nodev,nosuid 0 0
|
||||
tmpfs /var/lib/ntp tmpfs nodev,nosuid 0 0
|
||||
tmpfs /var/lib/pyheatpump tmpfs nodev,nosuid 0 0
|
||||
tmpfs /var/run tmpfs nodev,nosuid 0 0
|
||||
tmpfs /tmp tmpfs nodev,nosuid 0 0
|
||||
EOF
|
||||
|
||||
# PROMPT FOR REBOOT --------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue