diff options
-rw-r--r-- | boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm | 12 | ||||
-rwxr-xr-x | config-db/slxconfig-demuxer | 1 | ||||
-rw-r--r-- | installer/OpenSLX/OSSetup/Engine.pm | 114 | ||||
-rw-r--r--[-rwxr-xr-x] | os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml | 80 | ||||
-rw-r--r-- | os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml | 54 | ||||
-rw-r--r-- | os-plugins/plugins/vmchooser/XX_vmchooser.sh | 35 | ||||
-rw-r--r-- | os-plugins/plugins/vmchooser/files/run-virt.sh | 5 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/XX_vmware.sh | 13 | ||||
-rw-r--r-- | os-plugins/plugins/vmware/files/run-virt.include | 9 |
9 files changed, 206 insertions, 117 deletions
diff --git a/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm b/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm index 1fee62a8..d9af92dd 100644 --- a/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm +++ b/boot-env/OpenSLX/MakeInitRamFS/Engine/Base.pm @@ -375,6 +375,18 @@ sub _writeSlxSystemConf file => "$self->{'build-path'}/etc/slxsystem.conf", content => $slxConf } ); + + # check if default directories available and copy them to /etc + my $defaultDirConfig = "$self->{'root-path'}/etc/opt/openslx/openslx.conf"; + my $configTargetPath = "$self->{'build-path'}/etc"; + + if (-r $defaultDirConfig) { + $self->addCMD("cp -p $defaultDirConfig $configTargetPath/"); + } else { + die _tr( + "No default directories defined!\n" . + "Please run install, update or clone of this system again!\n"); + } return; } diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer index 84e1ed00..6e848486 100755 --- a/config-db/slxconfig-demuxer +++ b/config-db/slxconfig-demuxer @@ -661,7 +661,6 @@ sub writeSystemConfiguration $info->{name}, $uclibcVersion, $currVersion ); } - my $attrProblems = OpenSLX::AttributeRoster->findProblematicValues( $info->{attrs}, $info->{'vendor-os'}->{name}, diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm index ba901d23..f5a27ee7 100644 --- a/installer/OpenSLX/OSSetup/Engine.pm +++ b/installer/OpenSLX/OSSetup/Engine.pm @@ -28,6 +28,7 @@ use Exporter; use Config::General; use File::Basename; +use File::Path; use URI; use OpenSLX::Basics; @@ -93,7 +94,8 @@ sub initialize } if ($vendorOSName !~ m[^([^\-]+\-[^\-]+)(?:\-(.+))?]) { die _tr( - "Given vendor-OS has unknown format, expected '<name>-<release>[-<selection>]'\n" + "Given vendor-OS has unknown format, " . + "expected '<name>-<release>[-<selection>]'\n" ); } my $distroName = lc($1); @@ -119,14 +121,16 @@ sub initialize } elsif ($actionType eq 'update' && $support !~ m[(update)]i) { print _tr( - "Sorry, update support for vendor-OS '%s' has not been implemented!\n", + "Sorry, update support for vendor-OS '%s' has not been " . + "implemented!\n", $distroName ); exit 1; } elsif ($actionType eq 'shell' && $support !~ m[(shell)]i) { print _tr( - "Sorry, vendor-OS '%s' has no support for chrooted shells available!\n", + "Sorry, vendor-OS '%s' has no support for chrooted shells " . + "available!\n", $distroName ); exit 1; @@ -154,7 +158,8 @@ sub initialize if ($actionType =~ m{^(install|update|shell|plugin)}) { # setup path to distribution-specific info: my $sharedDistroInfoDir - = "$openslxConfig{'base-path'}/share/distro-info/$self->{'distro-name'}"; + = "$openslxConfig{'base-path'}/share/distro-info/" . + "$self->{'distro-name'}"; if (!-d $sharedDistroInfoDir) { die _tr( "unable to find shared distro-info in '%s'\n", @@ -266,6 +271,9 @@ sub installVendorOS ) ); + # generate default openslx directories for the client + $self->_generateDefaultDirs(); + # add the uclibs and tools to the stage1 and add them to library search # path $self->_copyUclibcRootfs(); @@ -305,7 +313,9 @@ sub cloneVendorOS # oops, given vendor-os has been installed, not cloned, we complain: croak( _tr( - "The vendor-OS '%s' exists but it is no clone, refusing to clobber!\nPlease delete the folder manually, if that's really what you want...\n", + "The vendor-OS '%s' exists but it is no clone, refusing " . + "to clobber!\nPlease delete the folder manually, if " . + "that's really what you want...\n", $self->{'vendor-os-path'} ) ); @@ -321,7 +331,9 @@ sub cloneVendorOS my $yes = _tr('yes'); my $no = _tr('no'); print _tr( - "Last time this vendor-OS was cloned, it has been cloned from '%s', now you specified a different source: '%s'\nWould you still like to proceed (%s/%s)? ", + "Last time this vendor-OS was cloned, it has been cloned " . + "from '%s', now you specified a different source: '%s'\n" . + "Would you still like to proceed (%s/%s)?", $lastCloneSource, $source, $yes, $no ); my $answer = <STDIN>; @@ -361,6 +373,10 @@ sub cloneVendorOS ) ); } + + # generate default openslx directories for the client + $self->_generateDefaultDirs(); + # add the uclibs and tools to the stage1 and add them to library search # path $self->_copyUclibcRootfs(); @@ -401,6 +417,7 @@ sub updateVendorOS } ); + $self->_generateDefaultDirs(); $self->_copyUclibcRootfs(); $self->_touchVendorOS(); vlog( @@ -419,7 +436,8 @@ sub startChrootedShellForVendorOS if (!-e $self->{'vendor-os-path'}) { die _tr( - "can't start chrooted shell for vendor-OS '%s', since it doesn't exist!\n", + "can't start chrooted shell for vendor-OS '%s', since it doesn't " . + "exist!\n", $self->{'vendor-os-path'} ); } @@ -457,7 +475,8 @@ sub callChrootedFunctionForVendorOS if (!-e $self->{'vendor-os-path'}) { die _tr( - "can't call chrooted function for vendor-OS '%s', since it doesn't exist!\n", + "can't call chrooted function for vendor-OS '%s', since it " . + "doesn't exist!\n", $self->{'vendor-os-path'} ); } @@ -626,7 +645,8 @@ sub removeVendorOSFromConfigDB vlog( 0, _tr( - "purging export '%s', since it belongs to the vendor-OS being deleted...", + "purging export '%s', since it belongs to the vendor-OS " . + "being deleted...", $export->{name} ) ); @@ -839,7 +859,8 @@ sub _configureBestMirrorsForRepository my $mirrorsToUseCount = $openslxConfig{'mirrors-to-use-count'} || 5; vlog(1, _tr( - "selecting the '%s' best mirrors (from a set of '%s') for repo '%s' ...", + "selecting the '%s' best mirrors (from a set of '%s') for repo " . + "'%s' ...", $mirrorsToUseCount, $mirrorsToTryCount, $repoInfo->{key} ) ); @@ -1071,6 +1092,38 @@ sub _touchVendorOS return; } +sub _generateDefaultDirs +{ + my $self = shift; + my $targetRoot = shift || $self->{'vendor-os-path'}; + + vlog(0, _tr("Creating default directories ...\n")); + + my $OPENSLX_DEFAULT_DIR = "/opt/openslx"; + my $OPENSLX_DEFAULT_CONFDIR = "/etc/opt/openslx"; + my $OPENSLX_DEFAULT_LOGDIR = "/var/log/openslx"; + my $OPENSLX_DEFAULT_BINDIR = "/var/opt/openslx/bin"; + my $OPENSLX_DEFAULT_LIBDIR = "/var/opt/openslx/lib"; + my $OPENSLX_DEFAULT_VIRTDIR = "/var/lib/virt"; + mkpath("$targetRoot/$OPENSLX_DEFAULT_DIR", + "$targetRoot/$OPENSLX_DEFAULT_CONFDIR", + "$targetRoot/$OPENSLX_DEFAULT_LOGDIR", + "$targetRoot/$OPENSLX_DEFAULT_BINDIR", + "$targetRoot/$OPENSLX_DEFAULT_LIBDIR", + "$targetRoot/$OPENSLX_DEFAULT_VIRTDIR"); + slxsystem("chmod 1777 $targetRoot/$OPENSLX_DEFAULT_LOGDIR"); + + my $openslxConfig = "OPENSLX_DEFAULT_DIR=$OPENSLX_DEFAULT_DIR\n"; + $openslxConfig .= "OPENSLX_DEFAULT_CONFDIR=$OPENSLX_DEFAULT_CONFDIR\n"; + $openslxConfig .= "OPENSLX_DEFAULT_LOGDIR=$OPENSLX_DEFAULT_LOGDIR\n"; + $openslxConfig .= "OPENSLX_DEFAULT_BINDIR=$OPENSLX_DEFAULT_BINDIR\n"; + $openslxConfig .= "OPENSLX_DEFAULT_LIBDIR=$OPENSLX_DEFAULT_LIBDIR\n"; + $openslxConfig .= "OPENSLX_DEFAULT_VIRTDIR=$OPENSLX_DEFAULT_VIRTDIR\n"; + + spitFile("$targetRoot/$OPENSLX_DEFAULT_CONFDIR/openslx.conf", + "$openslxConfig"); +} + sub _copyUclibcRootfs { my $self = shift; @@ -1170,7 +1223,8 @@ sub _sortRepositoryURLs if (!@URLs) { die( _tr( - "repository '%s' has no URLs defined, unable to fetch anything!", + "repository '%s' has no URLs defined, " . + "unable to fetch anything!", $repoInfo->{name}, ) ); @@ -1210,10 +1264,12 @@ try_next_url: } elsif ($basefile =~ /.*\.rpm/) { vlog(5,"Trying suggested name because of .rpm-ending."); } else { - die _tr("file <$basefile> not found in list received from mirror"); + die _tr("file <$basefile> not found in list received from" . + "mirror"); } vlog(2, "fetching <$basefile>..."); - if (slxsystem("wget", "-c", "-O", "$basefile", "$url/$basedir$basefile") == 0) { + if (slxsystem("wget", "-c", "-O", "$basefile", + "$url/$basedir$basefile") == 0) { $foundFile = $basefile; last; } @@ -1253,11 +1309,12 @@ sub _startLocalURLServersAsNeeded foreach my $repoInfo (values %{$self->{'distro-info'}->{repository}}) { my $localURL = $repoInfo->{'local-url'} || ''; next if !$localURL; - next if $localURL =~ m[^\w+:]; # anything with a protcol-spec is non-local + next if $localURL =~ m[^\w+:]; # anything /w a protcol-spec is non-local if (!exists $localHttpServers{$localURL}) { my $pid = executeInSubprocess( - $self->busyboxBinary(), "httpd", '-p', $port, '-h', '/', '-f' + $self->busyboxBinary(), "httpd", '-p', $port, '-h', '/', + '-f' ); vlog(1, _tr( @@ -1300,7 +1357,8 @@ sub _setupStage1A # we create *all* of the above folders by creating stage1cDir: my $stage1cDir - = "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}/$self->{'stage1cSubdir'}"; + = "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}/". + "$self->{'stage1cSubdir'}"; if (slxsystem("mkdir -p $stage1cDir")) { die _tr("unable to create directory '%s', giving up! (%s)\n", $stage1cDir, $!); @@ -1346,7 +1404,8 @@ sub _stage1A_setupResolver #copyFile("$libcFolder/libnss_files*", "$self->{stage1aDir}$libcFolder"); my $stage1cDir - = "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}/$self->{'stage1cSubdir'}"; + = "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}/" . + "$self->{'stage1cSubdir'}"; copyFile('/etc/resolv.conf', "$stage1cDir/etc"); return; } @@ -1359,14 +1418,16 @@ sub _stage1A_copyPrerequiredFiles vlog(2, "copying folder with pre-required files..."); my $stage1cDir - = "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}/$self->{'stage1cSubdir'}"; + = "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}/" . + "$self->{'stage1cSubdir'}"; my $cmd = qq[ tar -cp -C $self->{'shared-distro-info-dir'}/prereqfiles . \\ | tar -xp -C $stage1cDir ]; if (slxsystem($cmd)) { die _tr( - "unable to copy folder with pre-required files to folder '%s' (%s)\n", + "unable to copy folder with pre-required files to folder '%s'" . + "(%s)\n", $stage1cDir, $! ); } @@ -1391,7 +1452,8 @@ sub _stage1A_copyTrustedPackageKeys ]; if (slxsystem($cmd)) { die _tr( - "unable to copy folder with trusted package keys to folder '%s' (%s)\n", + "unable to copy folder with trusted package keys to folder " . + "'%s' (%s)\n", "$stage1bDir/trusted-package-keys", $! ); } @@ -1467,7 +1529,8 @@ sub _stage1B_chrootAndBootstrap $self->{'distro-info'}->{repository}->{base} ); $self->{'baseURL-index'} = 0; - my @pkgs = string2Array($self->{'distro-info'}->{'prereq-packages'}); + my @pkgs = + string2Array($self->{'distro-info'}->{'prereq-packages'}); vlog( 2, "downloading these prereq packages:\n\t" . join("\n\t", @pkgs) @@ -1476,7 +1539,8 @@ sub _stage1B_chrootAndBootstrap $self->{'prereq-packages'} = \@prereqPkgs; $self->{packager}->bootstrap(\@prereqPkgs); - @pkgs = string2Array($self->{'distro-info'}->{'bootstrap-packages'}); + @pkgs = + string2Array($self->{'distro-info'}->{'bootstrap-packages'}); push( @pkgs, string2Array( @@ -1537,7 +1601,8 @@ sub _stage1C_cleanupBasicVendorOS my $self = shift; my $stage1cDir - = "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}/$self->{'stage1cSubdir'}"; + = "$self->{'stage1aDir'}/$self->{'stage1bSubdir'}/" . + "$self->{'stage1cSubdir'}"; if (slxsystem("mv $stage1cDir/* $self->{'vendor-os-path'}/")) { die _tr( "unable to move final setup to '%s' (%s)\n", @@ -1791,7 +1856,8 @@ sub _installPlugins ); for my $pluginInfo ( sort { - $self->_sortPluginsByDependency($a->{plugin_name}, $b->{plugin_name}); + $self->_sortPluginsByDependency($a->{plugin_name}, + $b->{plugin_name}); } @$plugins ) { my $pluginName = $pluginInfo->{plugin_name}; diff --git a/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml b/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml index 0706e8f0..46ef334e 100755..100644 --- a/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml +++ b/os-plugins/plugins/desktop/themes/gdm/openslx/theme.xml @@ -5,13 +5,13 @@ GDM-OpenSLX-Theme --> <greeter id="theme"> - <!-- background --> + <!-- background --> <item type="pixmap" id="background" background="true"> <normal file="color.png"/> <pos x="0" y="0" width="100%" height="100%"/> </item> - <!-- top / welcome, clock and big logo --> + <!-- top / welcome, clock and big logo --> <item type="rect" id="top" background="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="n" x="50%" y="0" width="100%" height="40%"/> @@ -21,14 +21,14 @@ GDM-OpenSLX-Theme <normal file="welcome-time-shadowed.png"/> <pos anchor="n" x="50%" y="0" width="80%" height="44"/> <box orientation="horizontal" homogeneous="true"> - <!-- Welcome on ... --> + <!-- Welcome on ... --> <item type="label" background="true"> <pos anchor="w" x="10%" y="30%"/> <normal color="#f0f0f0" font="Sans 11"/> <stock type="welcome-label"/> </item> <!-- clock --> - <item type="label" id="clock" background="true"> + <item type="label" id="clock"> <pos anchor="e" x="90%" y="30%"/> <normal color="#f0f0f0" font="Sans 11"/> <text>%c</text> @@ -50,7 +50,7 @@ GDM-OpenSLX-Theme </box> </item> - <!-- main part / login, session, menu, ... --> + <!-- main part / login, session, menu, ... --> <item type="pixmap" id="main-runner" background="true"> <normal file="main-runner.png"/> <pos anchor="c" x="50%" y="50%" width="100%" height="160"/> @@ -61,13 +61,13 @@ GDM-OpenSLX-Theme <pos anchor="w" x="0%" y="50%" width="100%" height="100%"/> <box orientation="horizontal" homogeneous="true"> - <!-- left part / login --> + <!-- left part / login --> <item type="rect" background="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="w" x="0" y="50%" width="100%" height="100%"/> <box orientation="horizontal"> - <!-- small logo --> + <!-- small logo --> <item type="pixmap" background="true"> <normal file="openslx-logo.png"/> <pos anchor="w" x="30" y="50%"/> @@ -91,16 +91,16 @@ GDM-OpenSLX-Theme </box> </item> - </box> + </box> </item> - <!-- middle part / errors, caps info, kdm logo --> + <!-- middle part / errors, caps info, gdm logo --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="c" x="50%" y="50%" width="90%" height="100%"/> - <box orientation="vertical"> + <box orientation="vertical"> - <!-- Login-Error --> + <!-- Login-Error --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="n" x="50%" y="10" width="100%" height="30"/> @@ -118,8 +118,8 @@ GDM-OpenSLX-Theme <pos anchor="c" x="50%" y="50%"/> </item> - <!-- capslock-warning --> - <item type="rect" id="caps-lock-warning"> + <!-- capslock-warning --> + <item type="rect" id="caps-lock-warning"> <normal color="#000000" alpha="0.4"/> <pos anchor="s" x="50%" y="-10" width="100%" height="30"/> <box> @@ -134,7 +134,7 @@ GDM-OpenSLX-Theme </box> </item> - <!-- right part / sessions, menu --> + <!-- right part / sessions, menu --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="e" x="100%" y="50%" width="100%" height="100%"/> @@ -164,7 +164,7 @@ GDM-OpenSLX-Theme </box> </item> - <!-- menu-button --> + <!-- menu-button --> <item type="rect" id="system_button" button="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="ne" x="-50" y="0" width="box" height="box"/> @@ -188,37 +188,37 @@ GDM-OpenSLX-Theme </box> </item> - </box> + </box> </item> </box> </item> - </box> + </box> </item> - <!-- language-button --> - <item type="rect" id="language_button" button="true"> - <normal color="#000000" alpha="0.0"/> - <pos anchor="se" x="-10" y="-10" width="box" height="box"/> - <box orientation="horizontal"> - <item type="label"> - <normal color="#3e5d72" font="Sans 11"/> - <prelight color="#557f9c" font="Sans 11"/> - <active color="#ff8b00" font="Sans 11"/> - <pos anchor="e" x="100%" y="16"/> - <stock type="language"/> - </item> - <item type="rect" id="language_button" button="true"> - <normal color="#000000" alpha="0.0"/> - <pos anchor="c" x="50%" y="50%" width="10"/> - </item> - <item type="pixmap" id="language_button" button="true"> - <normal file="language-selector_inactive.png"/> - <prelight file="language-selector.png"/> - <pos anchor="ne" x="100%" y="0%"/> - </item> - </box> - </item> + <!-- language-button --> + <item type="rect" id="language_button" button="true"> + <normal color="#000000" alpha="0.0"/> + <pos anchor="se" x="-10" y="-10" width="box" height="box"/> + <box orientation="horizontal"> + <item type="label"> + <normal color="#3e5d72" font="Sans 11"/> + <prelight color="#557f9c" font="Sans 11"/> + <active color="#ff8b00" font="Sans 11"/> + <pos anchor="e" x="100%" y="16"/> + <stock type="language"/> + </item> + <item type="rect" id="language_button" button="true"> + <normal color="#000000" alpha="0.0"/> + <pos anchor="c" x="50%" y="50%" width="10"/> + </item> + <item type="pixmap" id="language_button" button="true"> + <normal file="language-selector_inactive.png"/> + <prelight file="language-selector.png"/> + <pos anchor="ne" x="100%" y="0%"/> + </item> + </box> + </item> </greeter> diff --git a/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml b/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml index 4af39bdf..d748c776 100644 --- a/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml +++ b/os-plugins/plugins/desktop/themes/kdm/openslx/theme.xml @@ -4,15 +4,15 @@ KDM-OpenSLX-Theme --> <greeter id="theme"> - <style font="Sans 11" window-text-color="#f0f0f0" base-color="#f0f0f0" text-color="#000000"/> + <style font="Sans 11" window-text-color="#f0f0f0" base-color="#f0f0f0" text-color="#000000"/> - <!-- background --> + <!-- background --> <item type="pixmap" id="background" background="true"> <normal file="color.png"/> <pos x="0" y="0" width="100%" height="100%"/> </item> - <!-- top / welcome, clock and big logo --> + <!-- top / welcome, clock and big logo --> <item type="rect" id="top" background="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="n" x="50%" y="0" width="100%" height="40%"/> @@ -22,14 +22,14 @@ KDM-OpenSLX-Theme <normal file="welcome-time-shadowed.png"/> <pos anchor="n" x="50%" y="0" width="80%" height="44"/> <box orientation="horizontal" homogeneous="true"> - <!-- Welcome on ... --> + <!-- Welcome on ... --> <item type="label" background="true"> <pos anchor="w" x="10%" y="30%"/> <normal color="#f0f0f0" font="Sans 11"/> <stock type="welcome-label"/> </item> - <!-- clock --> - <item type="label" id="clock" background="true"> + <!-- clock --> + <item type="label" id="clock"> <pos anchor="e" x="90%" y="30%"/> <normal color="#f0f0f0" font="Sans 11"/> <text>%c</text> @@ -51,7 +51,7 @@ KDM-OpenSLX-Theme </box> </item> - <!-- main part / login, session, menu, ... --> + <!-- main part / login, session, menu, ... --> <item type="pixmap" id="main-runner" background="true"> <normal file="main-runner.png"/> <pos anchor="c" x="50%" y="50%" width="100%" height="160"/> @@ -62,19 +62,19 @@ KDM-OpenSLX-Theme <pos anchor="w" x="0%" y="50%" width="100%" height="100%"/> <box orientation="horizontal" homogeneous="true"> - <!-- left part / login --> + <!-- left part / login --> <item type="rect" background="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="w" x="0" y="50%" width="100%" height="100%"/> <box orientation="horizontal"> - <!-- small logo --> + <!-- small logo --> <item type="pixmap" background="true"> <normal file="openslx-logo.png"/> <pos anchor="w" x="30" y="50%"/> </item> - <!-- login --> + <!-- login --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="w" x="70" y="50%" width="box" height="box"/> @@ -99,7 +99,7 @@ KDM-OpenSLX-Theme </box> </item> - <item type="rect"> + <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="nw" x="0" y="0" width="box" height="box"/> <box homogeneous="true" spacing="10"> @@ -112,27 +112,27 @@ KDM-OpenSLX-Theme <pos anchor="w" x="0" y="50%" height="20" width="100"/> </item> </box> - </item> + </item> - <item type="pixmap" button="true" id="login_button"> - <pos anchor="sw" x="0" y="-0" height="20" width="20"/> - <normal file="enter_inactive.png"/> - <prelight file="enter.png"/> - </item> + <item type="pixmap" button="true" id="login_button"> + <pos anchor="sw" x="0" y="-0" height="20" width="20"/> + <normal file="enter_inactive.png"/> + <prelight file="enter.png"/> + </item> </box> </item> - </box> + </box> </item> - <!-- middle part / errors, caps info, kdm logo --> + <!-- middle part / errors, caps info, kdm logo --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="c" x="50%" y="50%" width="90%" height="100%"/> - <box orientation="vertical"> + <box orientation="vertical"> - <!-- Login-Error --> + <!-- Login-Error --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="n" x="50%" y="10" width="100%" height="30"/> @@ -150,8 +150,8 @@ KDM-OpenSLX-Theme <pos anchor="c" x="50%" y="50%"/> </item> - <!-- capslock-warning --> - <item type="rect" id="caps-lock-warning"> + <!-- capslock-warning --> + <item type="rect" id="caps-lock-warning"> <normal color="#000000" alpha="0.4"/> <pos anchor="s" x="50%" y="-10" width="100%" height="30"/> <box> @@ -166,7 +166,7 @@ KDM-OpenSLX-Theme </box> </item> - <!-- right part / sessions, menu --> + <!-- right part / sessions, menu --> <item type="rect"> <normal color="#000000" alpha="0.0"/> <pos anchor="e" x="100%" y="50%" width="100%" height="100%"/> @@ -196,7 +196,7 @@ KDM-OpenSLX-Theme </box> </item> - <!-- menu-button --> + <!-- menu-button --> <item type="rect" id="system_button" button="true"> <normal color="#000000" alpha="0.0"/> <pos anchor="ne" x="-50" y="0" width="box" height="box"/> @@ -220,13 +220,13 @@ KDM-OpenSLX-Theme </box> </item> - </box> + </box> </item> </box> </item> - </box> + </box> </item> </greeter> diff --git a/os-plugins/plugins/vmchooser/XX_vmchooser.sh b/os-plugins/plugins/vmchooser/XX_vmchooser.sh index 65e23d4e..1cb827a3 100644 --- a/os-plugins/plugins/vmchooser/XX_vmchooser.sh +++ b/os-plugins/plugins/vmchooser/XX_vmchooser.sh @@ -12,14 +12,19 @@ # script is included from init via the "." load function - thus it has all # variables and functions available +# include default directories +. /etc/openslx.conf + CONFFILE="/initramfs/plugin-conf/vmchooser.conf" +ETCDIR=/mnt/${OPENSLX_DEFAULT_CONFDIR} +VIRTDIR=/mnt/${OPENSLX_DEFAULT_VIRTDIR} if [ -e $CONFFILE ]; then . $CONFFILE if [ $vmchooser_active -ne 0 ] ; then - [ $DEBUGLEVEL -gt 0 ] && echo "vmchooser: copying stage3 configuration file ..." - testmkd /mnt/etc/opt/openslx - cp $CONFFILE /mnt/etc/opt/openslx/vmchooser-stage3.conf + [ $DEBUGLEVEL -gt 0 ] \ + && echo "vmchooser: copying stage3 configuration file ..." + cp $CONFFILE ${ETCDIR}/vmchooser-stage3.conf testmkd /mnt/var/X11R6/bin ln -s /opt/openslx/plugin-repo/vmchooser/run-virt.sh \ @@ -28,8 +33,8 @@ if [ -e $CONFFILE ]; then /mnt/var/X11R6/bin/vmchooser # setup all generic virtualization / starting stuff like the floppy image - testmkd /mnt/var/lib/virt/vmchooser/fd-loop 1777 - testmkd /mnt/var/lib/virt/vmchooser/loopimg + testmkd ${VIRTDIR}/vmchooser/fd-loop 1777 + testmkd ${VIRTDIR}/vmchooser/loopimg # loop file for exchanging information between linux and vm guest if modprobe ${MODPRV} loop; then @@ -39,32 +44,32 @@ if [ -e $CONFFILE ]; then fi # mount a clean tempfs (bug in UnionFS prevents loopmount to work) grep -qE "unionfs |aufs " /proc/mounts && \ - mount -n -o size=1500k -t tmpfs vm-loopimg /mnt/var/lib/virt/vmchooser/loopimg + mount -n -o size=1500k -t tmpfs vm-loopimg ${VIRTDIR}/vmchooser/loopimg # create an empty floppy image of 1.4MByte size - dd if=/dev/zero of=/mnt/var/lib/virt/vmchooser/loopimg/fd.img \ - count=2880 bs=512 2>/dev/null - chmod 0777 /mnt/var/lib/virt/vmchooser/loopimg/fd.img + dd if=/dev/zero of=${VIRTDIR}/vmchooser/loopimg/fd.img count=2880 bs=512 \ + 2>/dev/null + chmod 0777 ${VIRTDIR}/vmchooser/loopimg/fd.img # use dos formatter copied into stage3 - mkdosfs /mnt/var/lib/virt/vmchooser/loopimg/fd.img >/dev/null 2>&1 #|| error - mount -n -t msdos -o loop,umask=000 /mnt/var/lib/virt/vmchooser/loopimg/fd.img \ - /mnt/var/lib/virt/vmchooser/fd-loop + mkdosfs ${VIRTDIR}/vmchooser/loopimg/fd.img >/dev/null 2>&1 #|| error + mount -n -t msdos -o loop,umask=000 ${VIRTDIR}/vmchooser/loopimg/fd.img \ + ${VIRTDIR}/vmchooser/fd-loop # create run-virt.include header (and fill in information on removable # devices if present echo -e "# run-virt.include created by $0 during stage3 plugin setup" \ - >/mnt/etc/opt/openslx/run-virt.include + >${ETCDIR}/run-virt.include waitfor /etc/hwinfo.cdrom j=0 for i in $(cat /etc/hwinfo.cdrom); do - echo "cdrom_$j=$i" >>/mnt/etc/opt/openslx/run-virt.include + echo "cdrom_$j=$i" >>${ETCDIR}/run-virt.include j=$(expr $j + 1) done waitfor /etc/hwinfo.floppy j=0 for i in $(cat /etc/hwinfo.floppy); do - echo "floppy_$j=$i" >>/mnt/etc/opt/openslx/run-virt.include + echo "floppy_$j=$i" >>${ETCDIR}/run-virt.include j=$(expr $j + 1) done diff --git a/os-plugins/plugins/vmchooser/files/run-virt.sh b/os-plugins/plugins/vmchooser/files/run-virt.sh index ee9c8124..910cf128 100644 --- a/os-plugins/plugins/vmchooser/files/run-virt.sh +++ b/os-plugins/plugins/vmchooser/files/run-virt.sh @@ -18,6 +18,9 @@ # fied virtualization tool. # ----------------------------------------------------------------------------- +# include default directories +. /etc/opt/openslx/openslx.conf + # Sanity checks ############################################################################### @@ -185,7 +188,7 @@ writelog () echo -e "$1" # Log into file - echo -e "$1" >>/tmp/run-virt.$$.log + echo -e "$1" >> ${OPENSLX_DEFAULT_LOGDIR}/run-virt.${USER}.$$.log } # Setup the rest of the environment and run the virtualization tool just confi- diff --git a/os-plugins/plugins/vmware/XX_vmware.sh b/os-plugins/plugins/vmware/XX_vmware.sh index 5068c0f6..34bb8067 100644 --- a/os-plugins/plugins/vmware/XX_vmware.sh +++ b/os-plugins/plugins/vmware/XX_vmware.sh @@ -16,6 +16,12 @@ # write /etc/vmware/config (if a non-standard location of vmware basedir is # to be configured), /etc/init.d/vmware +# include default directories +. /etc/openslx.conf + +ETCDIR=/mnt/${OPENSLX_DEFAULT_CONFDIR} +VIRTDIR=/mnt/${OPENSLX_DEFAULT_VIRTDIR} + # check if the configuration file is available if [ -e /initramfs/plugin-conf/vmware.conf ]; then @@ -154,7 +160,7 @@ $(ipcalc -m $vmip/$vmpx|sed s/.*=//) {" \ vmimgpath="$(uri_token ${vmware_imagesrc} path)" fi if [ -n "${vmimgserv}" -a -n ${vmimgpath} -a -n ${vmimgprot} ] ; then - mnttarget=/mnt/var/lib/virt/vmware + mnttarget=${VIRTDIR}/vmware # mount the vmware image source readonly (ro) fsmount ${vmimgprot} ${vmimgserv} ${vmimgpath} ${mnttarget} ro else @@ -196,12 +202,11 @@ prefvmx.useRecommendedLockedMemSize = "TRUE"' | sed -e "s/^ *//" \ # copy version depending files - the vmchooser expects for every virtua- # lization plugin a file named after it (here run-vmware.include) - testmkd /mnt/etc/opt/openslx cp /mnt/opt/openslx/plugin-repo/vmware/run-virt.include \ - /mnt/etc/opt/openslx/run-vmware.include + ${ETCDIR}/run-vmware.include # copy version depending files cp /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/vmplayer \ - /mnt/var/X11R6/bin/vmplayer + /mnt/var/X11R6/bin/vmplayer if [ -e /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/vmware ]; then cp /mnt/opt/openslx/plugin-repo/vmware/${vmware_kind}/vmware \ /mnt/var/X11R6/bin/vmware diff --git a/os-plugins/plugins/vmware/files/run-virt.include b/os-plugins/plugins/vmware/files/run-virt.include index 725ccb1c..a148442c 100644 --- a/os-plugins/plugins/vmware/files/run-virt.include +++ b/os-plugins/plugins/vmware/files/run-virt.include @@ -15,6 +15,8 @@ # - component for vmware/player of the vmchooser plugin run-virt.sh # ----------------------------------------------------------------------------- +# include default directories +. /etc/opt/openslx/openslx.conf # include general configuration from vmchooser . /etc/opt/openslx/run-virt.include @@ -211,6 +213,8 @@ confdir=${redodir} conffile="${confdir}/run-vmware.conf" # users vmware config folder vmhome="${HOME}/.vmware" +# logfile +logfile=${OPENSLX_DEFAULT_LOGDIR}/run-vmware.${USER}.$$.log # get several version infos for vmware/player . /etc/vmware/slxvmconfig @@ -376,11 +380,6 @@ done # logging and stdout ################################################################################ -logfile=${vmhome}/run-vmware.`hostname`.log - -# remove ols logs -rm ${vmhome}/run-vmware.* >/dev/null 2>&1 - # function to write to stdout and logfile writelog () { |