From e2a9b882df6ff28cdd8e7bed328902df68425cec Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 3 Mar 2013 01:13:20 +0100 Subject: [PATCH] openmamba-netsrpms: add support for accepting license from terminal when no DISPLAY is available --- openmamba-update/openmamba-netsrpms | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/openmamba-update/openmamba-netsrpms b/openmamba-update/openmamba-netsrpms index b4961ba..0c992a7 100755 --- a/openmamba-update/openmamba-netsrpms +++ b/openmamba-update/openmamba-netsrpms @@ -99,8 +99,17 @@ for pckname in $PACKAGES; do cpio --quiet --extract --make-directories < $tmpfile ) 2>/dev/null if [ -f $tmpdir/LICENSE ]; then - license-dialog $tmpdir/LICENSE - [ $? -ne 0 ] && exit 1 + if [ "$DISPLAY" ]; then + license-dialog $tmpdir/LICENSE + [ $? -ne 0 ] && exit 1 + else + echo "You must accept the following license terms:" + echo + more $tmpdir/LICENSE + echo -n "Do you agree with the above license terms [y/N]? " + read ans + [ "$ans" = "Y" -o "$ans" = "y" ] || exit 1 + fi fi notify-send -a $"Network software installation" -i $icon "$pckname" $"$pckname installation in progress..."