1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#!/usr/bin/perl
#
# Slrnpull configurator program. By Joey Hess, <joeyh@debian.org>
use Debian::DebConf::Client::ConfModule ':all';
version('2.0');
capb('backup');
title('Slrnpull configuration');
TOP:
beginblock;
if (! -f "/etc/news/server" || -z "/etc/news/server") {
my $nntpserver=get('shared/news/server');
# If there is no server set, try to guess a good value.
if ($nntpserver eq '' &&
`hostname -f 2>/dev/null`=~m/(?:.*?\.)?(.*\.\w+)/) {
set("shared/news/server", "news.$1");
}
input('medium', 'shared/news/server');
}
input('low', 'slrnpull/run_from');
endblock;
my @ret=go;
if ($ret[0] == 30) {
# Going back at this point is up to the frontend,
# since it involves jumping out of this configmodule.
# This is just a placeholder for something not in the spec.
exit;
}
if (get('slrnpull/run_from') eq 'manually') {
# We need to show them this message.
input('low', 'slrnpull/run_manual');
my @ret=go;
if ($ret[0] == 30) {
goto TOP;
}
}
|