Displaying 1 result from an estimated 1 matches for "the_tty".
Did you mean:
the_qry
2009 Jul 14
0
[PATCH node] Changes the exit prompt based on whether it's firstboot of cmdline.
...xecute 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