diff options
Diffstat (limited to 'data/live-build-config/includes.chroot/opt/vyatta/etc/install-image/postinst')
-rwxr-xr-x | data/live-build-config/includes.chroot/opt/vyatta/etc/install-image/postinst | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/data/live-build-config/includes.chroot/opt/vyatta/etc/install-image/postinst b/data/live-build-config/includes.chroot/opt/vyatta/etc/install-image/postinst new file mode 100755 index 0000000..d807fa9 --- /dev/null +++ b/data/live-build-config/includes.chroot/opt/vyatta/etc/install-image/postinst @@ -0,0 +1,17 @@ +#!/bin/bash + +source /opt/vyatta/sbin/install-functions + +NEWVER=`mount | grep /mnt/inst_root` +NEWVER=${NEWVER#*upperdir=/live/image/boot/} +NEWVER=${NEWVER%/live-rw*} +DISK_LABEL=`mount | grep /live/image | awk '{print $1}' | grep dev` + +if [ -d "/live/image" ]; then + e2label "${DISK_LABEL}" persistence + if [ ! -f /live/image/persistence.conf ]; then + echo "/ union" > /live/image/persistence.conf + fi + rm -f /live/image/boot/"${NEWVER}"/live-rw/etc/fstab + mv /live/image/boot/"${NEWVER}"/live-rw /live/image/boot/"${NEWVER}"/rw +fi |