1
0
mirror of https://github.com/rancher/os.git synced 2025-09-17 07:30:42 +00:00

Refactor state

This commit is contained in:
Josh Curl
2016-07-27 23:25:08 -07:00
parent 1877cfa16b
commit 6b4222888c
8 changed files with 91 additions and 32 deletions

View File

@@ -85,7 +85,7 @@ set timeout="1"
menuentry "RancherOS-current" {
set root=(hd0,msdos1)
linux /boot/vmlinuz-${VERSION}-rancheros ${append_line} console=${CONSOLE}
linux /boot/vmlinuz-${VERSION}-rancheros ${append_line} rancher.state.dev=LABEL=RANCHER_STATE rancher.state.wait console=${CONSOLE}
initrd /boot/initrd-${VERSION}-rancheros
}
@@ -96,7 +96,7 @@ if [ ! -z ${ROLLBACK_VERSION} ]; then
cat >>${grub_cfg} <<EOF
menuentry "RancherOS-rollback" {
set root=(hd0,msdos1)
linux /boot/vmlinuz-${ROLLBACK_VERSION}-rancheros ${append_line} console=${CONSOLE}
linux /boot/vmlinuz-${ROLLBACK_VERSION}-rancheros ${append_line} rancher.state.dev=LABEL=RANCHER_STATE rancher.state.wait console=${CONSOLE}
initrd /boot/initrd-${ROLLBACK_VERSION}-rancheros
}
EOF
@@ -123,7 +123,7 @@ hiddenmenu
title RancherOS ${VERSION}-(current)
root (hd0)
kernel /boot/vmlinuz-${VERSION}-rancheros ${append_line} console=${CONSOLE}
kernel /boot/vmlinuz-${VERSION}-rancheros ${append_line} rancher.state.dev=LABEL=RANCHER_STATE rancher.state.wait console=${CONSOLE}
initrd /boot/initrd-${VERSION}-rancheros
EOF
@@ -133,7 +133,7 @@ if [ ! -z ${ROLLBACK_VERSION} ]; then
cat >> ${grub_file}<<EOF
title RancherOS ${ROLLBACK_VERSION}-(rollback)
root (hd0)
kernel /boot/vmlinuz-${ROLLBACK_VERSION}-rancheros ${append_line} console=${CONSOLE}
kernel /boot/vmlinuz-${ROLLBACK_VERSION}-rancheros ${append_line} rancher.state.dev=LABEL=RANCHER_STATE rancher.state.wait console=${CONSOLE}
initrd /boot/initrd-${ROLLBACK_VERSION}-rancheros
EOF
fi

View File

@@ -2,4 +2,4 @@ default rancheros
label rancheros
kernel /boot/vmlinuz
initrd /boot/initrd
append quiet rancher.password=rancher rancher.state.autoformat=[/dev/sda,/dev/vda]
append quiet rancher.password=rancher

View File

@@ -122,7 +122,7 @@ fi
KERNEL_ARGS="quiet rancher.password=rancher console=${TTYCONS} ${QEMU_APPEND}"
if [ "$FORMAT" == "1" ]; then
KERNEL_ARGS="${KERNEL_ARGS} rancher.state.formatzero=true rancher.state.autoformat=[/dev/sda,/dev/vda]"
KERNEL_ARGS="${KERNEL_ARGS} rancher.state.dev=LABEL=RANCHER_STATE rancher.state.formatzero=true rancher.state.autoformat=[/dev/sda,/dev/vda]"
fi
if [ "$RM_USR" == "1" ]; then
KERNEL_ARGS="${KERNEL_ARGS} rancher.rm_usr"