labs: rename local vars: boot libs

Make local variables lowercase and some of them more descriptive.

Change-Id: I05ef2562c2f4ff4e4a08b54719d70938dd54bacd
This commit is contained in:
Roger Luethi 2014-08-30 13:05:50 +02:00
parent d5a7260c7d
commit 49e43b74c6
4 changed files with 27 additions and 27 deletions

View File

@ -19,24 +19,24 @@ readonly _KS_all=http://git.openstack.org/cgit/openstack/training-guides/plain/l
readonly _BOOT_ARGS="linux ks=%s"
function vbox_distro_start_installer {
local VM_NAME=$1
local vm_name=$1
# pick a _KS_* file
local KICKSTART=_KS_$VM_ACCESS
local kickstart=_KS_$VM_ACCESS
echo "Using $KICKSTART ${!KICKSTART}"
echo "Using $kickstart ${!kickstart}"
local BOOT_ARGS=$(printf "$_BOOT_ARGS" "${!KICKSTART}")
local boot_args=$(printf "$_BOOT_ARGS" "${!kickstart}")
vbox_kbd_escape_key "$VM_NAME"
vbox_kbd_escape_key "$vm_name"
vbox_sleep 1
echo "Pushing boot command line"
vbox_kbd_string_input "$VM_NAME" "$BOOT_ARGS"
vbox_kbd_string_input "$vm_name" "$boot_args"
echo "Initiating boot sequence"
vbox_kbd_enter_key "$VM_NAME"
vbox_kbd_enter_key "$vm_name"
}
# vim: set ai ts=4 sw=4 et ft=sh:

View File

@ -28,26 +28,26 @@ readonly _BOOT_ARGS="/install/vmlinuz
console-setup/ask_detect=false"
function vbox_distro_start_installer {
local VM_NAME=$1
local vm_name=$1
# pick a _PS_* file
local PRESEED=_PS_$VM_ACCESS
local preseed=_PS_$VM_ACCESS
echo "Using $PRESEED ${!PRESEED}"
echo "Using $preseed ${!preseed}"
local BOOT_ARGS=$(printf "$_BOOT_ARGS" "${!PRESEED}")
local boot_args=$(printf "$_BOOT_ARGS" "${!preseed}")
vbox_kbd_escape_key "$VM_NAME"
vbox_kbd_escape_key "$VM_NAME"
vbox_kbd_enter_key "$VM_NAME"
vbox_kbd_escape_key "$vm_name"
vbox_kbd_escape_key "$vm_name"
vbox_kbd_enter_key "$vm_name"
vbox_sleep 1
echo "Pushing boot command line"
vbox_kbd_string_input "$VM_NAME" "$BOOT_ARGS"
vbox_kbd_string_input "$vm_name" "$boot_args"
echo "Initiating boot sequence"
vbox_kbd_enter_key "$VM_NAME"
vbox_kbd_enter_key "$vm_name"
}
# vim: set ai ts=4 sw=4 et ft=sh:

View File

@ -27,26 +27,26 @@ readonly _BOOT_ARGS="/install/vmlinuz
console-setup/ask_detect=false"
function vbox_distro_start_installer {
local VM_NAME=$1
local vm_name=$1
# pick a _PS_* file
local PRESEED=_PS_$VM_ACCESS
local preseed=_PS_$VM_ACCESS
echo "Using $PRESEED ${!PRESEED}"
echo "Using $preseed ${!preseed}"
local BOOT_ARGS=$(printf "$_BOOT_ARGS" "${!PRESEED}")
local boot_args=$(printf "$_BOOT_ARGS" "${!preseed}")
vbox_kbd_escape_key "$VM_NAME"
vbox_kbd_escape_key "$VM_NAME"
vbox_kbd_enter_key "$VM_NAME"
vbox_kbd_escape_key "$vm_name"
vbox_kbd_escape_key "$vm_name"
vbox_kbd_enter_key "$vm_name"
vbox_sleep 1
echo "Pushing boot command line"
vbox_kbd_string_input "$VM_NAME" "$BOOT_ARGS"
vbox_kbd_string_input "$vm_name" "$boot_args"
echo "Initiating boot sequence"
vbox_kbd_enter_key "$VM_NAME"
vbox_kbd_enter_key "$vm_name"
}
# vim: set ai ts=4 sw=4 et ft=sh:

View File

@ -7,8 +7,8 @@
# The library works with bash 3.2 (shipped with Mac OS X as of 2014).
function char2scancode {
local KEY=$1
case "$KEY" in
local key=$1
case "$key" in
'a')
echo -n " 1e 9e"
;;