summaryrefslogtreecommitdiffstats
path: root/dkms-modules-info/2.6.33.3-desktop-1mnb/lirc_sasem.description
blob: 45e17a866a69de6f09a4d7aa8944438b754c720c (plain)
1
USB Driver for Sasem Remote Controller V1.1
2cbd'>perl-install/install_steps_interactive.pm
blob: ed0a16fb13ef0f839affbbce6b5dfb17f909a7ac (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
package install_steps_interactive;


use diagnostics;
use strict;
use vars qw(@ISA);

@ISA = qw(install_steps);

use common qw(:common);
use partition_table qw(:types);
use install_steps;
use install_any;
use detect_devices;
use network;
use modules;
use lang;
use keyboard;
use fs;
use log;
use printer;
1;

sub errorInStep($$) {
    my ($o, $err) = @_;
    $o->ask_warn(_("Error"), [ _("An error occurred"), $err ]);
}


sub chooseLanguage($) {
    my ($o) = @_;
    lang::text2lang($o->ask_from_list("Language",
		__("Which language do you want?"), # the translation may be used for the help
                [ lang::list() ], 
		lang::lang2text($o->default("lang"))));
}

sub chooseKeyboard($) {
    my ($o) = @_;
    keyboard::text2keyboard($o->ask_from_list_("Keyboard",
               _("Which keyboard do you have?"),
               [ keyboard::list() ],
               keyboard::keyboard2text($o->default("keyboard"))));
}

sub selectInstallOrUpgrade($) {
    my ($o) = @_;
    $o->ask_from_list_(_("Install/Upgrade"), 
		       _("Is this an install or an upgrade?"),
		       [ __("Install"), __("Upgrade") ], 
		       $o->default("isUpgrade") ? "Upgrade" : "Install") eq "Upgrade";
}

sub selectInstallClass($@) {
    my ($o, @classes) = @_;
    $o->ask_from_list_(_("Install Class"),
		       _("What type of user will you have?"),
		       [ @classes ], $o->default("installClass"));
}

sub setupSCSI { setup_thiskind($_[0], 'scsi', $_[1]) }

sub rebootNeeded($) {
    my ($o) = @_;
    $o->ask_warn('', _("You need to reboot for the partition table modifications to take place"));
    $o->SUPER::rebootNeeded;
}

sub choosePartitionsToFormat($$) {
    my ($o, $fstab) = @_;

    $o->SUPER::choosePartitionsToFormat($fstab);

    my @l = grep { $_->{mntpoint} && isExt2($_) || isSwap($_) } @$fstab;
    my @r = $o->ask_many_from_list_ref('', _("Choose the partitions you want to format"), 
				       [ map { $_->{mntpoint} || type2name($_->{type}) . " ($_->{device})" } @l ],
				       [ map { \$_->{toFormat} } @l ]);
    defined @r or die "cancel";
}

sub formatPartitions {
    my $o = shift;
    my $w = $o->wait_message('', '');
    foreach (@_) {
	if ($_->{toFormat}) {
	    $w->set(_("Formatting partition %s", $_->{device}));
	    fs::format_part($_);
	}
    }
}

sub configureNetwork($) {
    my ($o, $first_time) = @_;
    my $r = '';

    if ($o->{intf}) {
	if ($first_time) {
	    my @l = (
		     __("Keep the current IP configuration"),
		     __("Reconfigure network now"),
		     __("Don't set up networking"),
		    );
	    $r = $o->ask_from_list_(_("Network Configuration"), 
				    _("LAN networking has already been configured. Do you want to:"),
				    [ @l ]);
	    $r ||= "Don't";
	}
    } else {
	$o->ask_yesorno(_("Network Configuration"),
			_("Do you want to configure LAN (not dialup) networking for your installed system?")) or $r = "Don't";
    }
    
    if ($r =~ /^Don't/) {
	$o->{netc}{NETWORKING} = "false";
    } elsif ($r !~ /^Keep/) {
	$o->setup_thiskind('net', 1, 1);
	my @l = detect_devices::getNet() or die _("no network card found");

	my $last; foreach ($::expert ? @l : $l[0]) {
	    my $intf = network::findIntf($o->{intf} ||= [], $_);
	    add2hash($intf, $last);
	    add2hash($intf, { NETMASK => '255.255.255.0' });
	    $o->configureNetworkIntf($intf);
	    $last = $intf;
	}
#	 { 
#	     my $wait = $o->wait_message(_("Hostname"), _("Determining host name and domain..."));
#	     network::guessHostname($o->{prefix}, $o->{netc}, $o->{intf});
#	 }
	$o->configureNetworkNet($o->{netc} ||= {}, @l);
    }
    $o->SUPER::configureNetwork;
}
	
sub timeConfig {
    my ($o, $f) = @_;
    add2hash($o->{timezone} ||= {}, $o->default("timezone"));

    $o->{timezone}{GMT} = $o->ask_yesorno('', _("Is your hardware clock set to GMT?"), $o->{timezone}{GMT});
    $o->{timezone}{timezone} = $o->ask_from_list('', _("In which timezone are you"), [ install_any::getTimeZones() ], $o->{timezone}{timezone});
    $o->SUPER::timeConfig($f);
}

sub printerConfig($) {
    my($o) = @_;
    $o->{printer}{want} = 
      $o->ask_yesorno(_("Printer"),
		      _("Would you like to configure a printer?"),
		      $o->{printer}{want});
    return if !$o->{printer}{want};

    $o->{printer}{complete} = 0;
    #std info
    #Don't wait, if the user enter something, you must remember it
    #($o->{default}{printer}{QUEUE}, $o->{default}{printer}{SPOOLDIR}) =
    $o->{printer}{QUEUE}    ||= $o->{default}{printer}{QUEUE};
    $o->{printer}{SPOOLDIR} ||= $o->{default}{printer}{SPOOLDIR};
    $o->ask_from_entries_ref(_("Standard Printer Options"),
			 _("Every print queue (which print jobs are directed to) needs a 
			   name (often lp) and a spool directory associated with it. What 
			   name and directory should be used for this queue?"),
			 [_("Name of queue:"), _("Spool directory:")],
			 [\$o->{printer}{QUEUE}, \$o->{printer}{SPOOLDIR}],
			);

    $o->{printer}{str_type} = 
      $o->ask_from_list_(_("Select Printer Connection"),
			 _("How is the printer connected?"),
			 [keys %printer::printer_type],
			 ${$o->default("printer")}{str_type},
			);
    $o->{printer}{TYPE} = $printer::printer_type{$o->{printer}{str_type}};

    if ($o->{printer}{TYPE} eq "LOCAL") {
	eval { modules::load("lp"); };
	my @port = ();
	foreach ("lp0", "lp1", "lp2") {
	    local *LP;
	    push @port, "/dev/$_" if open LP, ">/dev/$_"
	    }
	eval { modules::unload("lp") };
	
	my $string = _("What device is your printer connected to 
			    (note that /dev/lp0 is equivalent to LPT1:)?\n");
	$string .= _("I detect :");
	$string .= join(", ", @port);

	$o->{printer}{DEVICE}    ||= $o->{default}{printer}{DEVICE};
	

	$o->ask_from_entries_ref(_("Local Printer Device"),
				 $string,
				 [_("Printer Device:")],
				 [\$o->{printer}{DEVICE}],
				);

    } elsif ($o->{printer}{TYPE} eq "REMOTE") {
	$o->{printer}{REMOTEHOST}     ||= $o->{default}{printer}{REMOTEHOST};
	$o->{printer}{REMOTEQUEUE}    ||= $o->{default}{printer}{REMOTEQUEUE};
	$o->ask_from_entries_ref(_("Remote lpd Printer Options"), 
				 _("To use a remote lpd print queue, you need to supply 
				   the hostname of the printer server and the queue name 
				   on that server which jobs should be placed in."),
				 [_("Remote hostname:"), _("Remote queue:")],
				 [\$o->{printer}{REMOTEHOST}, \$o->{printer}{REMOTEQUEUE}],
				);
	
    } elsif ($o->{printer}{TYPE} eq "SMB") {
	$o->{printer}{SMBHOST}      ||= $o->{default}{printer}{SMBHOST};  
	$o->{printer}{SMBHOSTIP}    ||= $o->{default}{printer}{SMBHOSTIP}; 
	$o->{printer}{SMBSHARE}     ||= $o->{default}{printer}{SMBSHARE};  
	$o->{printer}{SMBUSER}      ||= $o->{default}{printer}{SMBUSER};
	$o->{printer}{SMBPASSWD}    ||= $o->{default}{printer}{SMBPASSWD};
	$o->{printer}{SMBWORKGROUP} ||= $o->{default}{printer}{SMBWORKGROUP};