~ubuntu-branches/ubuntu/oneiric/localization-config/oneiric

« back to all changes in this revision

Viewing changes to conffiles.d/ltsp.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Konstantinos Margaritis
  • Date: 2004-12-10 19:10:18 UTC
  • Revision ID: james.westby@ubuntu.com-20041210191018-wdjfbljdie570dld
Tags: 0.109
* Translations
  - Added Finnish by Tapio Lehtonen. Closes: #281040
  - Fixed Spanish translation (was too long). Closes: #284570

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
# The wrapper script for ltsp (post-install)
 
3
 
 
4
use strict;
 
5
use warnings;
 
6
use Getopt::Long;
 
7
 
 
8
my $debug;
 
9
 
 
10
# Get command line options
 
11
GetOptions("debug" => \$debug);
 
12
 
 
13
# We use methods in common.pl
 
14
require '/usr/lib/localization-config/common/common.pl';
 
15
 
 
16
# The path where the scripts are kept
 
17
my $LIB = '/usr/lib/localization-config';
 
18
 
 
19
# call init() to initialize the APT config system
 
20
init();
 
21
 
 
22
# Define the version map for ltsp
 
23
my %vermap = ( '3.0.5-0',          => { RELEASE => 'woody' },
 
24
             );
 
25
# Get locale entry
 
26
my $lang = shift;
 
27
 
 
28
my $script = "ltsp-xfree86-kbd";
 
29
my $package = "ltsp-core-i386";
 
30
 
 
31
if (is_installed($package)) {
 
32
    # Get appropriate release for this package
 
33
    my $release = get_release($package, %vermap);
 
34
 
 
35
    # Execute the corresponding script
 
36
    $script = "$LIB/$release/".$script;
 
37
    print "Running $script $lang\n" if $debug;
 
38
    system ($script, $lang) if -x $script;
 
39
}
 
40
 
 
41
1;