From 860d4a0b31cc57542642c27e0cc1e3c85756c468 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Tue, 24 Feb 2004 02:01:58 +0000 Subject: Ask user before installing packages. --- perl-install/standalone/scannerdrake | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'perl-install/standalone/scannerdrake') diff --git a/perl-install/standalone/scannerdrake b/perl-install/standalone/scannerdrake index e925a97c6..a6d13602e 100755 --- a/perl-install/standalone/scannerdrake +++ b/perl-install/standalone/scannerdrake @@ -46,6 +46,13 @@ if (!files_exist('/usr/bin/scanimage', '/usr/bin/xsane', if_(files_exist("/usr/bin/gimp"), "/usr/lib/gimp/1.2/plug-ins/xsane"))) { + if (!$in->ask_yesorno(N("Warning"), N("SANE packages need to be installed to use scanners. + +Do you want to install the SANE packages?"))) { + $in->ask_warn("Scannerdrake", + N("Aborting Scannerdrake.")); + exit 0; + } if (!$in->do_pkgs->install('sane-backends', 'xsane', if_($in->do_pkgs->is_installed('gimp'), 'xsane-gimp'))) { @@ -898,7 +905,12 @@ sub sharewindow { # running if (!files_exist('/usr/sbin/xinetd', '/usr/sbin/saned')) { - if (!$in->do_pkgs->install('xinetd', 'saned')) { + if (!$in->ask_yesorno(N("Warning"), N("saned needs to be installed to share the local scanner(s). + +Do you want to install the saned package?"))) { + $in->ask_warn("Scannerdrake", + N("Your scanner(s) will not be available on the network.")); + } elsif (!$in->do_pkgs->install('xinetd', 'saned')) { $in->ask_warn(N("Error"), N("Could not install the packages needed to share your scanner(s).") . " " . N("Your scanner(s) will not be available on the network.")); -- cgit v1.2.1