Darryl L. Pierce
2009-Jul-14 20:05 UTC
[Ovirt-devel] [PATCH node] Changes the exit prompt based on whether it's firstboot of cmdline.
If the menu is launched during firstboot then the menu shows the "Continue with stateless boot" text. If the menu is launched from the cmdline then it will show "Exit". Resolves: rhbz#511122 Signed-off-by: Darryl L. Pierce <dpierce at redhat.com> --- scripts/ovirt-config-setup | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/scripts/ovirt-config-setup b/scripts/ovirt-config-setup index ee78254..105f7bc 100755 --- a/scripts/ovirt-config-setup +++ b/scripts/ovirt-config-setup @@ -10,7 +10,23 @@ CONFIG_DIR=/etc/ovirt-config-setup.d # special options, all others execute the symlinked script in CONFIG_DIR DEBUG_SHELL="Shell" -CONTINUE="Continue Stateless Boot" + +during_firstboot=true +for tty in $(ps -ef | awk '{ printf $2"::"$6" " '}); do + if [[ "$tty" =~ "$$::" ]]; then + len=${#$} + the_tty=${tty:len+2} + if [ "$the_tty" != "?" ]; then + during_firstboot=false + fi + fi +done + +if $during_firstboot; then + CONTINUE="Continue Stateless Boot" +else + CONTINUE="Exit Setup Menu" +fi declare -a OPTIONS -- 1.6.2.5
Maybe Matching Threads
- [PATCH node] Changes the exit/continue based on context.
- [PATCH node] Adds a log viewer option to o-c-setup. bz#506289
- Printing on a Window Client from AIX
- access to databases in puppet - best practice?
- why $cdr{'CALLERID'} and $cdr{'DNID'} are empty in perl agi connected with asterisk manager