forked from webmin/webmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_info.pl
executable file
·56 lines (42 loc) · 1.51 KB
/
config_info.pl
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
44
45
46
47
48
49
50
51
52
53
54
55
require './burner-lib.pl';
sub config_form
{
print &ui_table_row($text{'config_cdrecord'},
&ui_textbox("cdrecord", $_[0]->{'cdrecord'}, 30)." ".
&file_chooser_button("cdrecord"));
print &ui_table_row($text{'config_mkisofs'},
&ui_textbox("mkisofs", $_[0]->{'mkisofs'}, 30)." ".
&file_chooser_button("mkisofs"));
print &ui_table_row($text{'config_mpg123'},
&ui_textbox("mpg123", $_[0]->{'mpg123'}, 30)." ".
&file_chooser_button("mpg123"));
print &ui_table_row($text{'config_sox'},
&ui_textbox("sox", $_[0]->{'sox'}, 30)." ".
&file_chooser_button("sox"));
print &ui_table_row($text{'config_cdrdao'},
&ui_textbox("cdrdao", $_[0]->{'cdrdao'}, 30)." ".
&file_chooser_button("cdrdao"));
print &ui_table_row($text{'config_temp'},
&ui_opt_textbox("temp", $_[0]->{'temp'}, 30,
$text{'config_temp_def'}));
}
sub config_save
{
&has_command($in{'cdrecord'}) || &error($text{'config_ecdrecord'});
$_[0]->{'cdrecord'} = $in{'cdrecord'};
#&has_command($in{'mkisofs'}) || &error($text{'config_emkisofs'});
$_[0]->{'mkisofs'} = $in{'mkisofs'};
#&has_command($in{'mpg123'}) || &error($text{'config_empg123'});
$_[0]->{'mpg123'} = $in{'mpg123'};
#&has_command($in{'sox'}) || &error($text{'config_esox'});
$_[0]->{'sox'} = $in{'sox'};
#&has_command($in{'cdrdao'}) || &error($text{'config_ecdrdao'});
$_[0]->{'cdrdao'} = $in{'cdrdao'};
if ($in{'temp_def'}) {
$_[0]->{'temp'} = undef;
}
else {
-d $in{'temp'} || &error($text{'config_etemp'});
$_[0]->{'temp'} = $in{'temp'};
}
}