summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOliver Tappe2007-07-28 22:38:11 +0200
committerOliver Tappe2007-07-28 22:38:11 +0200
commit102f63c43b0e32622bb5bf83a84cdac67174f539 (patch)
treeebd5ad2f8c50bca4e8cc38140ae55ee8071bf39c /lib
parent* changed several class interfaces as a result of trying to integrate support (diff)
downloadcore-102f63c43b0e32622bb5bf83a84cdac67174f539.tar.gz
core-102f63c43b0e32622bb5bf83a84cdac67174f539.tar.xz
core-102f63c43b0e32622bb5bf83a84cdac67174f539.zip
* finished installation support for Debian-etch, Debian-sarge and Ubuntu
are nearly done (Ubuntu still missing a kernel ...) * some more refactorings to accommodate Debian-support git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1282 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'lib')
-rw-r--r--lib/OpenSLX/Basics.pm1
-rw-r--r--lib/OpenSLX/Utils.pm27
-rw-r--r--lib/distro-info/debian-3.1/prereqfiles/etc/hosts1
-rw-r--r--lib/distro-info/debian-3.1/settings.example9
-rw-r--r--lib/distro-info/debian-4.0/prereqfiles/etc/hosts1
-rw-r--r--lib/distro-info/debian-4.0/settings.example9
6 files changed, 41 insertions, 7 deletions
diff --git a/lib/OpenSLX/Basics.pm b/lib/OpenSLX/Basics.pm
index e1ca36fb..ecdc5cab 100644
--- a/lib/OpenSLX/Basics.pm
+++ b/lib/OpenSLX/Basics.pm
@@ -84,6 +84,7 @@ my $translations;
# but not by any other script:
#
'ossetup-max-try-count' => '5',
+ 'default-timezone' => 'Europe/Berlin',
);
chomp($openslxConfig{'locale-charmap'});
diff --git a/lib/OpenSLX/Utils.pm b/lib/OpenSLX/Utils.pm
index bb24f961..bc57078a 100644
--- a/lib/OpenSLX/Utils.pm
+++ b/lib/OpenSLX/Utils.pm
@@ -25,7 +25,7 @@ $VERSION = 1.01;
@EXPORT = qw(
copyFile fakeFile linkFile
copyBinaryWithRequiredLibs
- slurpFile spitFile
+ slurpFile spitFile appendFile
followLink
unshiftHereDoc
string2Array
@@ -125,6 +125,21 @@ sub spitFile
return;
}
+sub appendFile
+{
+ my $fileName = shift || croak 'need to pass in a fileName!';
+ my $content = shift;
+
+ my $fh;
+ open($fh, '>>', $fileName)
+ or croak _tr("unable to create file '%s' (%s)\n", $fileName, $!);
+ print $fh $content
+ or croak _tr("unable to print to file '%s' (%s)\n", $fileName, $!);
+ close($fh)
+ or croak _tr("unable to close file '%s' (%s)\n", $fileName, $!);
+ return;
+}
+
sub followLink
{
my $path = shift || croak 'need to pass in a path!';
@@ -171,7 +186,7 @@ sub copyBinaryWithRequiredLibs {
foreach my $lib (split "\n", $requiredLibsStr) {
my $libDir = dirname($lib);
my $targetLib = "$params->{libTargetFolder}$libDir";
-# next if -e $targetLib;
+ next if -e "$targetLib/$lib";
vlog(3, "copying lib '$lib'");
copyFile($lib, $targetLib);
}
@@ -182,11 +197,9 @@ sub unshiftHereDoc
{
my $content = shift;
return $content unless $content =~ m{^(\s+)};
- my $shift = length($1);
- return
- join "\n",
- map { substr($_, $shift); }
- split m{\n}, $content;
+ my $shiftStr = $1;
+ $content =~ s[^$shiftStr][]gms;
+ return $content;
}
sub string2Array
diff --git a/lib/distro-info/debian-3.1/prereqfiles/etc/hosts b/lib/distro-info/debian-3.1/prereqfiles/etc/hosts
new file mode 100644
index 00000000..75721cd5
--- /dev/null
+++ b/lib/distro-info/debian-3.1/prereqfiles/etc/hosts
@@ -0,0 +1 @@
+127.0.0.1 localhost
diff --git a/lib/distro-info/debian-3.1/settings.example b/lib/distro-info/debian-3.1/settings.example
new file mode 100644
index 00000000..1b4b35bd
--- /dev/null
+++ b/lib/distro-info/debian-3.1/settings.example
@@ -0,0 +1,9 @@
+# copy this file to 'settings' and edit it as you please
+
+# use local installation sources
+$repository{'base'}->{'url'} = "/srv/ftp/pub/debian";
+
+# Add a new selection:
+# $selection{'my-kde'} = "$selection{default}
+# foo
+# bar";
diff --git a/lib/distro-info/debian-4.0/prereqfiles/etc/hosts b/lib/distro-info/debian-4.0/prereqfiles/etc/hosts
new file mode 100644
index 00000000..75721cd5
--- /dev/null
+++ b/lib/distro-info/debian-4.0/prereqfiles/etc/hosts
@@ -0,0 +1 @@
+127.0.0.1 localhost
diff --git a/lib/distro-info/debian-4.0/settings.example b/lib/distro-info/debian-4.0/settings.example
new file mode 100644
index 00000000..1b4b35bd
--- /dev/null
+++ b/lib/distro-info/debian-4.0/settings.example
@@ -0,0 +1,9 @@
+# copy this file to 'settings' and edit it as you please
+
+# use local installation sources
+$repository{'base'}->{'url'} = "/srv/ftp/pub/debian";
+
+# Add a new selection:
+# $selection{'my-kde'} = "$selection{default}
+# foo
+# bar";