summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorKim Hagen <kim.sidney@gmail.com>2016-05-21 11:38:35 -0400
committerKim Hagen <kim.sidney@gmail.com>2016-05-21 11:38:35 -0400
commita7cc5e8d9c9fc90578ba93377d1254a1140003d7 (patch)
tree07e6cf9b9085cec430c91824a833a58839768b23 /components
parentab71f2f81939ed63c415fc69ae9b35ea90958bc0 (diff)
downloadlive-boot-a7cc5e8d9c9fc90578ba93377d1254a1140003d7.tar.gz
live-boot-a7cc5e8d9c9fc90578ba93377d1254a1140003d7.zip
T69 Remove floppy device settings
Diffstat (limited to 'components')
-rwxr-xr-xcomponents/9990-vyos.sh64
1 files changed, 22 insertions, 42 deletions
diff --git a/components/9990-vyos.sh b/components/9990-vyos.sh
index 2f515ba..4306443 100755
--- a/components/9990-vyos.sh
+++ b/components/9990-vyos.sh
@@ -4,49 +4,29 @@
Vyos ()
{
-
-# live-initramfs header
-
+ # live-initramfs header
. /scripts/functions
. /lib/live/boot/9990-initramfs-tools.sh
-# live-initramfs script
-
-# try floppy
-# if we do not discover an fd device, try loading the floppy module
-grep -q fd /proc/devices || modprobe -q floppy 2>/dev/null
-if grep -q fd /proc/devices
-then
- mkdir -p /root/media/floppy
- mount /dev/fd0 /root/media/floppy -o sync,noatime,noexec,nosuid,nodev
-fi 2>/dev/null
-
-# bind the vyatta config directory with the following precedence
-# 1) backing store if present
-# 2) floppy if present
-# 3) create live/"overlay" which may or maynot be on a non-volatile device
-# but is certainly read-write
-
-VYOS_MOUNT_DIR=`echo ${VYOS_MOUNT} | sed 's/live/mount/'`
-unioncfgpath="$(trim_path /root/lib/live/${VYOS_MOUNT_DIR}/${PERSISTENCE_PATH}/rw)"
-
-if [ -d /root/opt/vyatta/etc/config ]
-then
- if [ -d ${unioncfgpath}/config ]
- then
- log_begin_msg "Using ${unioncfgpath}/config..."
- mount -o bind ${unioncfgpath}/config /root/opt/vyatta/etc/config
- log_end_msg
- elif [ -d /root/media/floppy/config ]
- then
- log_begin_msg "Using /root/media/floppy/config..."
- mount -o bind /root/media/floppy/config /root/opt/vyatta/etc/config
- log_end_msg
- else
- log_begin_msg "Creating ${unioncfgpath}/config..."
- cp -a /root/opt/vyatta/etc/config ${unioncfgpath} >/dev/null 2>&1
- mount -o bind ${unioncfgpath}/config /root/opt/vyatta/etc/config
- log_end_msg
- fi
-fi
+ log_begin_msg "Configuring VyOS config path"
+
+ # bind the vyatta config directory with the following precedence
+ # 1) backing store if present
+ # 2) create live/"overlay" which may or maynot be on a non-volatile device
+ # but is certainly read-write
+
+ VYOS_MOUNT_DIR="$(echo ${VYOS_MOUNT} | sed 's/live/mount/')"
+ unioncfgpath="$(trim_path /root/lib/live/${VYOS_MOUNT_DIR}/${PERSISTENCE_PATH}/rw)"
+
+ if [ -d /root/opt/vyatta/etc/config ]
+ then
+ if [ -d ${unioncfgpath}/config
+ then
+ mount -o bind ${unioncfgpath}/config /root/opt/vyatta/etc/config
+ else
+ cp -a /root/opt/vyatta/etc/config ${unioncfgpath} >/dev/null 2>&1
+ mount -o bind ${unioncfgpath}/config /root/opt/vyatta/etc/config
+ fi
+ fi
+ log_end_msg
}