add /boot and /media to /etc/fstab on startup (issue #220)

This commit is contained in:
Trammell Hudson 2017-07-17 12:22:48 -04:00
parent ba98d5dda6
commit 86f3e9f5dc
Failed to extract signature

View File

@ -29,6 +29,15 @@ hwclock -l -s
. /etc/functions
. /etc/config
# Add our boot devices into the /etc/fstab, if they are defined
# in the configuration file.
if [ ! -z "$CONFIG_BOOT_DEV" ]; then
echo >> /etc/fstab "$CONFIG_BOOT_DEV /boot auto defaults,ro 0 0"
fi
if [ ! -z "$CONFIG_USB_BOOT_DEV" ]; then
echo >> /etc/fstab "$CONFIG_USB_BOOT_DEV /media auto defaults,ro 0 0"
fi
if [ ! -x "$CONFIG_BOOTSCRIPT" ]; then
recovery 'Boot script missing? Entering recovery shell'
# just in case...