/usr/share/usermin
NameSizeModeActions
at/-0755rm
authentic-theme/-0755rm
blue-theme/-0755rm
changepass/-0755rm
chfn/-0755rm
commands/-0755rm
cron/-0755rm
cshrc/-0755rm
fetchmail/-0755rm
filemin/-0755rm
filter/-0755rm
forward/-0755rm
gnupg/-0755rm
gray-theme/-0755rm
htaccess/-0755rm
htaccess-htpasswd/-0755rm
images/-0755rm
lang/-0755rm
language/-0755rm
mailbox/-0755rm
mailcap/-0755rm
man/-0755rm
mysql/-0755rm
plan/-0755rm
postgresql/-0755rm
proc/-0755rm
procmail/-0755rm
quota/-0755rm
schedule/-0755rm
shell/-0755rm
spam/-0755rm
ssh/-0755rm
theme/-0755rm
tunnel/-0755rm
twofactor/-0755rm
ulang/-0755rm
unauthenticated/-0755rm
updown/-0755rm
usermount/-0755rm
vendor_perl/-0755rm
xterm/-0755rm
acl_security.pl29590755editdlrm
chooser.cgi73870755editdlrm
config-aix2270644editdlrm
config-cobalt-linux2640644editdlrm
config-coherent-linux2640644editdlrm
config-corel-linux2640644editdlrm
config-debian-linux2640644editdlrm
config-freebsd2560644editdlrm
config-generic-linux2640644editdlrm
config-gentoo-linux2640644editdlrm
config-hpux2430644editdlrm
config-irix2840644editdlrm
config-lib.pl121200755editdlrm
config-macos2600644editdlrm
config-mandrake-linux2780644editdlrm
config-msc-linux2640644editdlrm
config-netbsd2830644editdlrm
config-open-linux2640644editdlrm
config-openbsd2410644editdlrm
config-openmamba-linux2640644editdlrm
config-openserver2360644editdlrm
config-osf12660644editdlrm
config-redhat-linux2640644editdlrm
config-slackware-linux2800644editdlrm
config-sol-linux2640644editdlrm
config-solaris4170644editdlrm
config-suse-linux2640644editdlrm
config-trustix-linux2640644editdlrm
config-turbo-linux2640644editdlrm
config-united-linux2640644editdlrm
config-unixware2860644editdlrm
copyconfig.pl44360755editdlrm
date_chooser.cgi22410755editdlrm
deb-name80644editdlrm
defaultacl980644editdlrm
defaulttheme160644editdlrm
entities_map.txt15010644editdlrm
favicon.ico150860644editdlrm
feedback.cgi65190755editdlrm
feedback_form.cgi35330755editdlrm
group_chooser.cgi76900755editdlrm
help.cgi23130755editdlrm
html-editor-lib.pl181470644editdlrm
index.cgi57810755editdlrm
install-module.pl13040755editdlrm
install-type40644editdlrm
javascript-lib.pl150420755editdlrm
lang_list.txt25700644editdlrm
LICENCE15160644editdlrm
LICENCE.ja16540644editdlrm
maketemp.pl4240755editdlrm
mime.types127130644editdlrm
miniserv.pem29690644editdlrm
miniserv.pl1894390755editdlrm
newmods.pl12800755editdlrm
oschooser.pl46550755editdlrm
os_list.txt358250644editdlrm
pam_login.cgi44290755editdlrm
password_change.cgi71920755editdlrm
password_form.cgi13270755editdlrm
perlpath.pl5710755editdlrm
README19720644editdlrm
robots.txt260644editdlrm
session_login.cgi52300755editdlrm
setup.sh268100755editdlrm
switch_user.cgi4040755editdlrm
thirdparty.pl17740755editdlrm
uconfig.cgi14280755editdlrm
uconfig_save.cgi14900755editdlrm
ui-lib.pl1159450755editdlrm
update-from-repo.sh151240755editdlrm
updateboot.pl24290755editdlrm
uptracker.cgi29560755editdlrm
usermin-init19270755editdlrm
usermin-pam1010644editdlrm
usermin-pam-osx2430644editdlrm
usermin-systemd4430644editdlrm
user_chooser.cgi75710755editdlrm
version60644editdlrm
web-lib-funcs.pl4051600755editdlrm
web-lib.pl9070755editdlrm
webmin-search-lib.pl96970755editdlrm
WebminCore.pm88730644editdlrm
webmin_search.cgi26970755editdlrm
Edit: /usr/share/usermin/oschooser.pl (4655B)
#!/usr/bin/perl # oschooser.pl # Read the list of operating systems and ask the user to choose # an OS and version # auto param: 0 = always ask user # 1 = automatic, give up if fails # 2 = automatic, ask user if fails # 3 = automatic, ask user if fails and if a TTY $| = 1; ($oslist, $out, $auto) = @ARGV; open(OS, "<".$oslist) || die "failed to open $oslist : $!"; while() { chop; if (/^([^\t]+)\t+([^\t]+)\t+([^\t]+)\t+([^\t]+)\t*(.*)$/) { push(@list, [ $1, $2, $3, $4, $5 ]); push(@names, $1) if (!$donename{$1}++); $names_to_real{$1} ||= $3; } } close(OS); if ($auto) { # Try to guess the OS name and version if (-r "/etc/.issue") { $etc_issue = `cat /etc/.issue`; } elsif (-r "/etc/issue") { $etc_issue = `cat /etc/issue`; } if (-r "/etc/os-release") { $os_release = `cat /etc/os-release`; } if (&has_command('uname')) { $uname = `uname -a 2>/dev/null`; } foreach $o (@list) { if ("$^O" =~ /MSWin32/ && "$o->[2]" !~ /windows/) { next; } if ($o->[4] && eval "$o->[4]") { # Got a match! Resolve the versions $ver = $o; if ($ver->[1] =~ /\$/) { $ver->[1] = eval "($o->[4]); $ver->[1]"; } if ($ver->[3] =~ /\$/) { $ver->[3] = eval "($o->[4]); $ver->[3]"; } last; } if ($@) { print STDERR "Error parsing $o->[4]\n"; } } if (!$ver) { if ($auto == 1) { # Failed .. give up print "Failed to detect operating system\n"; exit 1; } elsif ($auto == 3) { # Do we have a tty? local $rv = system("tty >/dev/null 2>&1"); if ($?) { print "Failed to detect operating system\n"; exit 1; } else { $auto = 0; } } else { # Ask the user $auto = 0; } } } if (!$auto) { if (0 && &has_command("dialog")) { # call the dialog command to ask for the OS (disabled for now) $cmd = "dialog --menu \"Please select your operating system type from the list below\" 20 60 12"; for($i=0; $i<@names; $i++) { $cmd .= " ".($i+1)." '$names[$i]'"; } $tmp_base = $ENV{'tempdir'} || "/tmp/.webmin"; $temp = "$tmp_base/dialog.out"; system("$cmd 2>$temp"); $osnum = `cat $temp`; $osnum = int($osnum); if (!$osnum) { #unlink($temp); print "ERROR: No operating system selected\n\n"; exit 9; } # call the dialog command to ask for the version $name = $names[$osnum-1]; @vers = grep { $_->[0] eq $name } @list; $cmd = "dialog --menu \"Please select your operating system's version from the list below\" 20 60 12"; for($i=0; $i<@vers; $i++) { $cmd .= " ".($i+1)." '$name $vers[$i]->[1]'"; } system("$cmd 2>$temp"); $vnum = `cat $temp`; $vnum = int($vnum); unlink($temp); if (!$vnum) { print "ERROR: No operating system version selected\n\n"; exit 9; } $ver = $vers[$vnum-1]; } else { # ask for the operating system name ourselves $dashes = "-" x 75; print <); if ($osnum !~ /^\d+$/) { print "ERROR: You must enter the number next to your operating\n"; print "system, not its name or version number.\n\n"; exit 9; } if ($osnum < 1 || $osnum > @names) { print "ERROR: $osnum is not a valid operating system number.\n\n"; exit 10; } print "\n"; # Ask for the operating system version $name = $names[$osnum-1]; print <); if ($vnum !~ /^\S+$/) { print "ERROR: An operating system number cannot contain\n\n"; print "spaces. It must be like 2.1 or ES4.0.\n"; exit 10; } print "\n"; $ver = [ $name, $vnum, $names_to_real{$name}, $vnum ]; } } # Write the name, version and real name and version to a file open(OUT, ">$out"); print OUT "os_type='",$ver->[2],"'\n"; print OUT "os_version='",$ver->[3],"'\n"; print OUT "real_os_type='",$ver->[0],"'\n"; print OUT "real_os_version='",$ver->[1],"'\n"; close(OUT); # has_command(command) # Returns the full path if some command is in the path, undef if not sub has_command { local($d); if (!$_[0]) { return undef; } local $rv = undef; if ($_[0] =~ /^\//) { $rv = (-x $_[0]) ? $_[0] : undef; } else { foreach $d (split(/:/ , $ENV{PATH})) { if (-x "$d/$_[0]") { $rv = "$d/$_[0]"; last; } } } return $rv; }