summaryrefslogtreecommitdiffstats
path: root/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm
diff options
context:
space:
mode:
Diffstat (limited to 'installer/OpenSLX/OSSetup/Distro/Ubuntu.pm')
-rw-r--r--installer/OpenSLX/OSSetup/Distro/Ubuntu.pm108
1 files changed, 54 insertions, 54 deletions
diff --git a/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm b/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm
index 4ab5abbc..5e7e41ea 100644
--- a/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm
+++ b/installer/OpenSLX/OSSetup/Distro/Ubuntu.pm
@@ -9,7 +9,7 @@
# General information about OpenSLX can be found at http://openslx.org/
# -----------------------------------------------------------------------------
# Ubuntu.pm
-# - provides Ubuntu-specific overrides of the OpenSLX OSSetup API.
+# - provides Ubuntu-specific overrides of the OpenSLX OSSetup API.
# -----------------------------------------------------------------------------
package OpenSLX::OSSetup::Distro::Ubuntu;
@@ -26,75 +26,75 @@ use OpenSLX::Utils;
################################################################################
sub new
{
- my $class = shift;
- my $self = {};
- return bless $self, $class;
+ my $class = shift;
+ my $self = {};
+ return bless $self, $class;
}
sub initialize
{
- my $self = shift;
- my $engine = shift;
+ my $self = shift;
+ my $engine = shift;
- $self->SUPER::initialize($engine);
- $self->{'packager-type'} = 'dpkg';
- $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'apt';
- $self->{'stage1c-faked-files'} = [];
- return;
+ $self->SUPER::initialize($engine);
+ $self->{'packager-type'} = 'dpkg';
+ $self->{'meta-packager-type'} = $ENV{SLX_META_PACKAGER} || 'apt';
+ $self->{'stage1c-faked-files'} = [];
+ return;
}
sub preSystemInstallationHook
{
- my $self = shift;
-
- $self->SUPER::preSystemInstallationHook();
+ my $self = shift;
+
+ $self->SUPER::preSystemInstallationHook();
- # fake required /dev-entries
- my %devInfo = (
- mem => { type => 'c', major => '1', minor => '1' },
- null => { type => 'c', major => '1', minor => '3' },
- zero => { type => 'c', major => '1', minor => '5' },
- random => { type => 'c', major => '1', minor => '8' },
- urandom => { type => 'c', major => '1', minor => '9' },
- kmsg => { type => 'c', major => '1', minor => '11' },
- console => { type => 'c', major => '5', minor => '1' },
- ptmx => { type => 'c', major => '5', minor => '2' },
- );
- foreach my $dev (keys %devInfo) {
- my $info = $devInfo{$dev};
- if (!-e "/dev/$dev") {
- if (slxsystem(
- "mknod /dev/$dev $info->{type} $info->{major} $info->{minor}"
- )) {
- croak(_tr("unable to create dev-node '%s'! (%s)", $dev, $!));
- }
- }
- }
- foreach my $devDir ('pts', 'shm', '.udevdb', '.udev') {
- if (!-e "/dev/$devDir") {
- if (slxsystem("mkdir -p /dev/$devDir")) {
- croak(_tr("unable to create dev-dir '%s'! (%s)", $devDir, $!));
- }
- }
- }
+ # fake required /dev-entries
+ my %devInfo = (
+ mem => { type => 'c', major => '1', minor => '1' },
+ null => { type => 'c', major => '1', minor => '3' },
+ zero => { type => 'c', major => '1', minor => '5' },
+ random => { type => 'c', major => '1', minor => '8' },
+ urandom => { type => 'c', major => '1', minor => '9' },
+ kmsg => { type => 'c', major => '1', minor => '11' },
+ console => { type => 'c', major => '5', minor => '1' },
+ ptmx => { type => 'c', major => '5', minor => '2' },
+ );
+ foreach my $dev (keys %devInfo) {
+ my $info = $devInfo{$dev};
+ if (!-e "/dev/$dev") {
+ if (slxsystem(
+ "mknod /dev/$dev $info->{type} $info->{major} $info->{minor}"
+ )) {
+ croak(_tr("unable to create dev-node '%s'! (%s)", $dev, $!));
+ }
+ }
+ }
+ foreach my $devDir ('pts', 'shm', '.udevdb', '.udev') {
+ if (!-e "/dev/$devDir") {
+ if (slxsystem("mkdir -p /dev/$devDir")) {
+ croak(_tr("unable to create dev-dir '%s'! (%s)", $devDir, $!));
+ }
+ }
+ }
- # replace /usr/sbin/invoke-rc.d by a dummy, in order to avoid a whole lot
- # of initscripts being started. Wishful thinking: there should be another
- # way to stop Ubuntu from doing this, as this is not really very supportive
- # of folder-based installations (then again: I may simply be too stupid
- # to find out how it is supposed to work ...)
- rename('/usr/sbin/invoke-rc.d', '/usr/sbin/_invoke-rc.d');
- spitFile('/usr/sbin/invoke-rc.d', "#! /bin/sh\nexit 0\n");
- chmod 0755, '/usr/sbin/invoke-rc.d';
+ # replace /usr/sbin/invoke-rc.d by a dummy, in order to avoid a whole lot
+ # of initscripts being started. Wishful thinking: there should be another
+ # way to stop Ubuntu from doing this, as this is not really very supportive
+ # of folder-based installations (then again: I may simply be too stupid
+ # to find out how it is supposed to work ...)
+ rename('/usr/sbin/invoke-rc.d', '/usr/sbin/_invoke-rc.d');
+ spitFile('/usr/sbin/invoke-rc.d', "#! /bin/sh\nexit 0\n");
+ chmod 0755, '/usr/sbin/invoke-rc.d';
}
sub postSystemInstallationHook
{
- my $self = shift;
+ my $self = shift;
- # restore /usr/sbin/invoke-rc.d
- rename('/usr/sbin/_invoke-rc.d', '/usr/sbin/invoke-rc.d');
- $self->SUPER::postSystemInstallationHook();
+ # restore /usr/sbin/invoke-rc.d
+ rename('/usr/sbin/_invoke-rc.d', '/usr/sbin/invoke-rc.d');
+ $self->SUPER::postSystemInstallationHook();
}
1; \ No newline at end of file