summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrikant Patnaik2015-02-20 13:40:33 +0530
committerSrikant Patnaik2015-02-20 13:40:33 +0530
commitba8a401f4103af52e037b66eb6dcac1658de2e3d (patch)
tree6f6337e0301314e0d3fbb4cd0b9a58aec321f0e9
parent462062c8b10fd50fe076191311d51399ce83bf0e (diff)
downloadFOSSEE-netbook-patcher-ba8a401f4103af52e037b66eb6dcac1658de2e3d.tar.gz
FOSSEE-netbook-patcher-ba8a401f4103af52e037b66eb6dcac1658de2e3d.tar.bz2
FOSSEE-netbook-patcher-ba8a401f4103af52e037b66eb6dcac1658de2e3d.zip
Added check for X server running status, this will help password function to switch to ncurses when run from console
-rwxr-xr-xpatcher.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/patcher.sh b/patcher.sh
index c9d1b4a..a3e737d 100755
--- a/patcher.sh
+++ b/patcher.sh
@@ -161,8 +161,8 @@ function sudo_access() {
sudo -K
# The only place 'easybashgui' fails. So adding separate functions for both tty(consoles)
# and pts(terminals). If tty not found, it returns 1, and 'zenity' is used
-tty | grep tty
-if [ $? -eq 1 ]; then
+
+if [ ! -z $(pidof X) ] ; then
while true
do