summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorKim Hagen <kim.sidney@gmail.com>2016-02-05 11:14:54 -0500
committerKim Hagen <kim.sidney@gmail.com>2016-02-05 11:14:54 -0500
commit89b0d6e89a06a0e56f32f4ee5f875b62fe885ee0 (patch)
tree80a39ef475553dc5c639b6b599ff22ca6843700b /data
parentcac38de1cb46ac6001f2a5a8c09865685e13cfa5 (diff)
downloadvyos-build-89b0d6e89a06a0e56f32f4ee5f875b62fe885ee0.tar.gz
vyos-build-89b0d6e89a06a0e56f32f4ee5f875b62fe885ee0.zip
Add post install script that will be used by squeeze versions of vyatta/vyos.
Diffstat (limited to 'data')
-rw-r--r--data/live-build-config/includes.chroot/opt/vyatta/etc/grub/default-union-grub-entry20
-rwxr-xr-xdata/live-build-config/includes.chroot/opt/vyatta/etc/install-image/postinst17
2 files changed, 37 insertions, 0 deletions
diff --git a/data/live-build-config/includes.chroot/opt/vyatta/etc/grub/default-union-grub-entry b/data/live-build-config/includes.chroot/opt/vyatta/etc/grub/default-union-grub-entry
new file mode 100644
index 00000000..4107e459
--- /dev/null
+++ b/data/live-build-config/includes.chroot/opt/vyatta/etc/grub/default-union-grub-entry
@@ -0,0 +1,20 @@
+menuentry "VyOS (KVM console)" {
+ linux /boot//vmlinuz boot=live quiet vyos-union=/boot/ console=ttyS0,9600 console=tty0
+ initrd /boot//initrd.img
+}
+
+menuentry "VyOS (Serial console)" {
+ linux /boot//vmlinuz boot=live quiet vyos-union=/boot/ console=tty0 console=ttyS0,9600
+ initrd /boot//initrd.img
+}
+
+menuentry "Lost password change (KVM console)" {
+ linux /boot//vmlinuz boot=live quiet vyos-union=/boot/ console=ttyS0,9600 console=tty0 init=/opt/vyatta/sbin/standalone_root_pw_reset
+ initrd /boot//initrd.img
+}
+
+menuentry "Lost password change (Serial console)" {
+ linux /boot//vmlinuz boot=live quiet vyos-union=/boot/ console=tty0 console=ttyS0,9600 init=/opt/vyatta/sbin/standalone_root_pw_reset
+ initrd /boot//initrd.img
+}
+
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 00000000..d807fa9b
--- /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