Commit a4cc3714 authored by Vitaly Lipatov's avatar Vitaly Lipatov

loginhsh: add -x option for login with X support

parent cf28c34e
...@@ -35,6 +35,7 @@ phelp() ...@@ -35,6 +35,7 @@ phelp()
echog " -c cleanup hasher" echog " -c cleanup hasher"
echog " -o log in as root user" echog " -o log in as root user"
echog " -v verbose" echog " -v verbose"
echog " -x allow run X program (set DISPLAY and use xauth)"
echog " -t use test hasher dir (different to build hasher)" echog " -t use test hasher dir (different to build hasher)"
echog " -M?? branch name" echog " -M?? branch name"
echo echo
...@@ -43,7 +44,7 @@ phelp() ...@@ -43,7 +44,7 @@ phelp()
echog " -r remote login to hasher" echog " -r remote login to hasher"
} }
while getopts :chitoavb: opt; do while getopts :chitoavb:x opt; do
case $opt in case $opt in
h) phelp; exit 0;; h) phelp; exit 0;;
t) TESTMODE=1 ;; t) TESTMODE=1 ;;
...@@ -52,6 +53,7 @@ while getopts :chitoavb: opt; do ...@@ -52,6 +53,7 @@ while getopts :chitoavb: opt; do
a) AUTOMODE=1 ;; a) AUTOMODE=1 ;;
b) BINARYREPONAME=$OPTARG ;; b) BINARYREPONAME=$OPTARG ;;
r) REMOTE=1 ;; r) REMOTE=1 ;;
x) ALLOWX=1 ;;
v) VERBOSE="-v" ;; v) VERBOSE="-v" ;;
o) ROOTER="--rooter" ;; o) ROOTER="--rooter" ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;; +?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
...@@ -115,12 +117,12 @@ UTILPKG="mc" ...@@ -115,12 +117,12 @@ UTILPKG="mc"
# GNOME program needs dbus-tools-gui # GNOME program needs dbus-tools-gui
if rpm --requires -p $LISTNAMES 2>/dev/null | grep -q dbus ; then if rpm --requires -p $LISTNAMES 2>/dev/null | grep -q dbus ; then
echo "dbus using detecteed, add dbus-tools-gui" echo "dbus using detected, add dbus-tools-gui"
UTILPKG="$UTILPKG dbus-tools-gui" UTILPKG="$UTILPKG dbus-tools-gui"
fi fi
if [ -n "$TESTMODE$AUTOMODE" ] ; then if [ -n "$AUTOMODE" ] || [ -n "$ALLOWX" ] ; then
UTILPKG="$UTILPKG XFree86-xauth fonts-ttf-liberation" UTILPKG="$UTILPKG xauth fonts-ttf-liberation"
else else
UTILPKG="$UTILPKG etersoft-build-utils" UTILPKG="$UTILPKG etersoft-build-utils"
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment