mirror of
https://github.com/rancher/os.git
synced 2025-09-17 07:30:42 +00:00
Refactor state
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user