if mode=1 and `dialog` is not usable, abort #197990 by DominikBuerkle
authorZac Medico <zmedico@gentoo.org>
Sat, 3 Nov 2007 22:50:59 +0000 (22:50 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 3 Nov 2007 22:50:59 +0000 (22:50 -0000)
(trunk r8402)

svn path=/main/branches/2.1.2/; revision=8406

bin/etc-update

index 7239ed07ba34ec3d63dd9a275c0851a7a2c599b5..bb1160a312d4de993d58a24f0543d7196e436fc3 100755 (executable)
@@ -541,6 +541,13 @@ else
        fi
 fi
 
+if [[ ${mode} == "1" ]] ; then
+       if ! type dialog >/dev/null || ! dialog --help >/dev/null ; then
+               echo "ERROR: mode=1 and 'dialog' not found or not executable, aborting"
+               exit 1
+       fi
+fi
+
 #echo "rm_opts: $rm_opts, mv_opts: $mv_opts, cp_opts: $cp_opts"
 #echo "pager: $pager, diff_command: $diff_command, merge_command: $merge_command"