From 879d8ea9221262a6abef63cadb45026c8b55c6a5 Mon Sep 17 00:00:00 2001 From: Marcus Date: Sun, 22 Oct 2023 20:29:21 +0200 Subject: [PATCH] time for the first testbuild with nanodesk-installer-gxm --- nanodesk-files/usr/bin/nanodesk-installer-gxm | 4 ++-- nanodesk-files/usr/sbin/nanodesk-installer | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/nanodesk-files/usr/bin/nanodesk-installer-gxm b/nanodesk-files/usr/bin/nanodesk-installer-gxm index f88505c..537eea3 100755 --- a/nanodesk-files/usr/bin/nanodesk-installer-gxm +++ b/nanodesk-files/usr/bin/nanodesk-installer-gxm @@ -136,8 +136,8 @@ exec-gparted() { exec-nanodesk-installer() { # run the installer within xterm - #xterm -e /bin/bash -c "pkexec /usr/sbin/nanodesk-installer $1 || echo 'pkexec auth failed' >> $ERRORFILE" - xterm -e /bin/bash -c "pkexec mc || echo 'pkexec auth failed' >> $ERRORFILE" + xterm -e /bin/bash -c "pkexec /usr/sbin/nanodesk-installer $1 true || echo 'pkexec auth failed' >> $ERRORFILE" + #xterm -e /bin/bash -c "pkexec mc || echo 'pkexec auth failed' >> $ERRORFILE" #xterm -e /bin/bash -c "pkexec mc || echo 'pkexec auth failed' >> $ERRORFILE" #xterm -e /bin/bash -c "pkexec 'false ' ; echo $? ; echo 'Please press enter to continue...' ; read" } diff --git a/nanodesk-files/usr/sbin/nanodesk-installer b/nanodesk-files/usr/sbin/nanodesk-installer index dc9fdb5..bb37b7f 100755 --- a/nanodesk-files/usr/sbin/nanodesk-installer +++ b/nanodesk-files/usr/sbin/nanodesk-installer @@ -7,6 +7,12 @@ ### this is just a hobby, nothing serious. i know the debian installer and other ### exist, but i wanted to try some handcrafted installation. +if [ -n "$2" ] && [ "$2" == true ] +then + GXMINSTALLER=true +else + GXMINSTALLER=false +fi CHROOTCMD="chroot /mnt/" ERRORFILE="/tmp/nanodesk-installer.error" @@ -46,8 +52,9 @@ function message() { } error () { - message error "ERROR!" echo "Error at: $MESSAGE" >> $ERRORFILE + message error "ERROR!" + test "$GXMINSTALLER" == true && read -p "Press [ENTER] to continue..." exit 1 }