From 49e43b74c6f3eebe1367db4ffb322553f37ee6a5 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Sat, 30 Aug 2014 13:05:50 +0200 Subject: [PATCH] labs: rename local vars: boot libs Make local variables lowercase and some of them more descriptive. Change-Id: I05ef2562c2f4ff4e4a08b54719d70938dd54bacd --- labs/lib/osbash/lib.fedora-20-x86_64 | 14 +++++++------- .../lib/osbash/lib.ubuntu-12.04.4-server-amd64 | 18 +++++++++--------- labs/lib/osbash/lib.ubuntu-14.04-server-amd64 | 18 +++++++++--------- labs/lib/osbash/scanlib | 4 ++-- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/labs/lib/osbash/lib.fedora-20-x86_64 b/labs/lib/osbash/lib.fedora-20-x86_64 index 2648658c..ba45f169 100644 --- a/labs/lib/osbash/lib.fedora-20-x86_64 +++ b/labs/lib/osbash/lib.fedora-20-x86_64 @@ -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: diff --git a/labs/lib/osbash/lib.ubuntu-12.04.4-server-amd64 b/labs/lib/osbash/lib.ubuntu-12.04.4-server-amd64 index a9c74aa4..6d2cba6d 100644 --- a/labs/lib/osbash/lib.ubuntu-12.04.4-server-amd64 +++ b/labs/lib/osbash/lib.ubuntu-12.04.4-server-amd64 @@ -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: diff --git a/labs/lib/osbash/lib.ubuntu-14.04-server-amd64 b/labs/lib/osbash/lib.ubuntu-14.04-server-amd64 index 5ad44b4c..7db1fb21 100644 --- a/labs/lib/osbash/lib.ubuntu-14.04-server-amd64 +++ b/labs/lib/osbash/lib.ubuntu-14.04-server-amd64 @@ -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: diff --git a/labs/lib/osbash/scanlib b/labs/lib/osbash/scanlib index 8e3fd781..f66c70f4 100644 --- a/labs/lib/osbash/scanlib +++ b/labs/lib/osbash/scanlib @@ -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" ;;