summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorThomas Jepp <tom@tomjepp.co.uk>2016-02-03 20:19:37 +0000
committerThomas Jepp <tom@tomjepp.co.uk>2016-02-03 20:19:37 +0000
commit71b85bc6c3f14bc6a47e295ae9346b05585e8496 (patch)
tree7379d827520865e37d70064a27761bdb23b6b938 /etc
parent21637d4db4eca53af3ec60f3d2cd8088bd3c39ca (diff)
downloadvyatta-cfg-71b85bc6c3f14bc6a47e295ae9346b05585e8496.tar.gz
vyatta-cfg-71b85bc6c3f14bc6a47e295ae9346b05585e8496.zip
Actually mount /boot and /boot/grub on Jessie.
Diffstat (limited to 'etc')
-rwxr-xr-xetc/init.d/vyatta-router39
1 files changed, 23 insertions, 16 deletions
diff --git a/etc/init.d/vyatta-router b/etc/init.d/vyatta-router
index 9d11aab..ce7f891 100755
--- a/etc/init.d/vyatta-router
+++ b/etc/init.d/vyatta-router
@@ -115,24 +115,31 @@ load_bootfile ()
# system-wide grub directory so that tools that edit the grub.cfg
# file will find it in the expected location.
#
-bind_mount_boot()
+bind_mount_boot ()
{
- if [ -e /live/image/boot ]; then
- image_name=`cat /proc/cmdline | sed -e s+^.*vyatta-union=/boot/++ | sed -e 's/ .*$//'`
- if [ -n "$image_name" ]; then
- mount --bind /live/image/boot/$image_name /boot
- if [ $? -ne 0 ]; then
- echo "Couldn't bind mount /boot"
- fi
- if [ ! -d /boot/grub ]; then
- mkdir /boot/grub
- fi
- mount --bind /live/image/boot/grub /boot/grub
- if [ $? -ne 0 ]; then
- echo "Couldn't bind mount /boot/grub"
- fi
+ persist_path=`/opt/vyatta/sbin/vyos-persistpath`
+ if [ $? == 0 ]; then
+ if [ -e $persist_path/boot ]; then
+ image_name=`cat /proc/cmdline | sed -e s+^.*vyatta-union=/boot/++ | sed -e 's/ .*$//'`
+
+ if [ -n "$image_name" ]; then
+ mount --bind $persist_path/boot/$image_name /boot
+
+ if [ $? -ne 0 ]; then
+ echo "Couldn't bind mount /boot"
+ fi
+
+ if [ ! -d /boot/grub ]; then
+ mkdir /boot/grub
+ fi
+
+ mount --bind $persist_path/boot/grub /boot/grub
+ if [ $? -ne 0 ]; then
+ echo "Couldn't bind mount /boot/grub"
+ fi
+ fi
+ fi
fi
- fi
}
#