#!/usr/local/bin/perl
# change_os.cgi
# Change OS settings

require './usermin-lib.pl';
$access{'os'} || &error($text{'acl_ecannot'});
&ReadParse();

&lock_file($usermin_config);
&get_usermin_config(\%uconfig);
@os = split(/,/, $in{'os'});
$uconfig{'real_os_type'} = $os[0];
$uconfig{'real_os_version'} = $os[1];
$uconfig{'os_type'} = $os[2];
$uconfig{'os_version'} = $os[3];
$uconfig{'path'} = $in{'path'};
$uconfig{'ld_path'} = $in{'ld_path'};
&put_usermin_config(\%uconfig);
&unlock_file($usermin_config);
&webmin_log("os", undef, undef, \%in);
&redirect("");
