diff options
author | Oliver Tappe | 2008-02-02 23:46:35 +0100 |
---|---|---|
committer | Oliver Tappe | 2008-02-02 23:46:35 +0100 |
commit | 77838eab1f8f770c86cb9a9e3db3d95ccb9f32de (patch) | |
tree | 46c90f5630b80a2db8c49d2a1f770106e03e12a5 | |
parent | * fixed bugs that stopped new-style initramfs from working (diff) | |
download | core-77838eab1f8f770c86cb9a9e3db3d95ccb9f32de.tar.gz core-77838eab1f8f770c86cb9a9e3db3d95ccb9f32de.tar.xz core-77838eab1f8f770c86cb9a9e3db3d95ccb9f32de.zip |
* switched config-demuxer over to internal generation of initramfs
* obsoleted mkdxsinitrd
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1511 95ad53e4-c205-0410-b2fa-d234c58c8868
-rw-r--r-- | Makefile | 8 | ||||
-rwxr-xr-x | config-db/slxconfig-demuxer | 85 | ||||
-rwxr-xr-x | installer/obsolete/mkdxsinitrd (renamed from initramfs/mkdxsinitrd) | 0 |
3 files changed, 1 insertions, 92 deletions
@@ -147,12 +147,6 @@ supported."; \ @ # copy license @cp COPYING $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/; - @ # copy initramfs generator scripts (and inject SLX_CONFIG_PATH, SLX_BASE_PATH on the way): - @cp ./initramfs/mkdxsinitrd $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin/; \ - sed -e "s,@@@SLX_CONFIG_PATH@@@,$(SLX_CONFIG_PATH)," \ - -e "s,@@@SLX_BASE_PATH@@@,$(SLX_BASE_PATH)," \ - -i $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin/mkdxsinitrd; - @ # copy all PERL-scripts and their required modules: @cp bin/slx* $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin/; \ cp config-db/slx* $(SLX_BUILD_PATH)$(SLX_BASE_PATH)/bin/; \ @@ -182,7 +176,6 @@ supported."; \ @ # link all binaries & scripts into user-path: @ln -sf $(SLX_BASE_PATH)/bin/slx* $(SLX_BUILD_PATH)$(USR_BIN_PATH)/; \ - ln -sf $(SLX_BASE_PATH)/bin/mkdxsinitrd $(SLX_BUILD_PATH)$(USR_BIN_PATH)/; \ @ # copy shareable data: @cd initramfs/cdboot; tar --exclude=.svn -cp * | \ @@ -268,7 +261,6 @@ and stage1" @rm -rf $(SLX_PUBLIC_PATH) @echo "files in $(SLX_PRIVATE_PATH) (please remove manually)" @rm -f $(USR_BIN_PATH)/slx* - @rm -f $(USR_BIN_PATH)/mkdxsinitrd clean: @echo "Cleanup OpenSLX source directory " diff --git a/config-db/slxconfig-demuxer b/config-db/slxconfig-demuxer index 364b8f53..d91e5b46 100755 --- a/config-db/slxconfig-demuxer +++ b/config-db/slxconfig-demuxer @@ -78,8 +78,6 @@ my ( # number of (system-specific) client configurations written $initramfsCount, # number of initramfs that were created - $makeInitRamFS, - # generate initial ramfs internally (new style) @targetSystems, # systems to create initramfs for, defaults to all systems $helpReq, @@ -93,7 +91,6 @@ if ($> != 0) { GetOptions( 'dhcp-export-type=s' => \$dhcpType, - 'makeinitramfs' => \$makeInitRamFS, 'dry-run' => \$dryRun, 'help|?' => \$helpReq, 'man' => \$manReq, @@ -511,82 +508,6 @@ sub writePXEMenus return; } -sub generateInitialRamFS -{ - my $info = shift; - my $pxeVendorOSPath = shift; - - my $vendorOS = $info->{'vendor-os'}; - - my $osExportEngine = instantiateClass("OpenSLX::OSExport::Engine"); - $osExportEngine->initializeFromExisting($info->{export}->{name}); - - vlog(1, _tr('generating initialramfs %s/initramfs', $pxeVendorOSPath)); - my $cmd = "$openslxConfig{'base-path'}/bin/mkdxsinitrd "; - my $attrs = $info->{attrs} || {}; - if ($attrs->{ramfs_nicmods}) { - $cmd .= qq[-n "$attrs->{ramfs_nicmods}" ]; - } - my $fsMods = $attrs->{ramfs_fsmods} || ''; - $fsMods .= ' ' . join(' ', $osExportEngine->requiredFSMods()); - if ($fsMods) { - $cmd .= qq[-f "$fsMods" ]; - } - if ($attrs->{ramfs_miscmods}) { - $cmd .= qq[-m "$attrs->{ramfs_miscmods}" ]; - } - my $rootPath = "$openslxConfig{'private-path'}/stage1/$vendorOS->{name}"; - $cmd .= "-i $pxeVendorOSPath/$info->{'initramfs-name'} -r $rootPath "; - - # pass in system name: - $cmd .= "-S $info->{name} "; - - # pass on theme, if any - my $theme = $attrs->{'theme::splash'} || ''; - if (length $theme) { - $cmd .= "-s $theme "; - } - - my $activePlugins = $info->{'active-plugins'}; - if ($activePlugins) { - $cmd .= '-p ' . join(',', @$activePlugins) . ' '; - } - - # always use dhclient instead of the busybox-provided dhcp-client - # (since the latter is unable to fetch NIS-stuff): - $cmd .= "-d "; - - # generate initramfs-setup file (with settings relevant for initramfs only): - my $initramfsAttrFile = "$tempPath/initramfs-setup"; - my $initramfsAttrs = { - attrs => { - 'host_name' => 'slx-client', # just to have something at all - 'ramfs_fsmods' => $attrs->{'ramfs_fsmods'} || '', - 'ramfs_nicmods' => $attrs->{'ramfs_nicmods'} || '', - 'ramfs_screen' => $attrs->{'ramfs_screen'} || '', - 'rootfs' => $info->{'export-uri'} || '', - }, - }; - writeAttributesToFile($initramfsAttrs, $initramfsAttrFile); - # and pass the generated initramfs-setup file to mkdxsinitrd: - $cmd .= "-c $initramfsAttrFile "; - - # ... set kernel version ... - my $kernelFile = basename(followLink($info->{'kernel-file'})); - $kernelFile =~ m[-(.+)$]; - my $kernelVersion = $1; - $cmd .= "-k $kernelVersion "; - - # ... add version info ... - my $slxver = `slxversion`; - chomp $slxver; - $ENV{'SLX_VERSION'} = $slxver; - - # ... finally invoke mkdxsinitrd: - slxsystem($cmd) unless $dryRun; - return; -} - sub makeInitRamFS { my $info = shift; @@ -643,11 +564,7 @@ sub writeSystemPXEFiles vlog(1, _tr('copying kernel %s to %s', $kernelFile, $targetKernel)); slxsystem(qq[cp -p "$kernelFile" "$targetKernel"]) unless $dryRun; } - if ($makeInitRamFS) { - makeInitRamFS($info, $pxeVendorOSPath); - } else { - generateInitialRamFS($info, $pxeVendorOSPath); - } + makeInitRamFS($info, $pxeVendorOSPath); $initramfsCount++; return; } diff --git a/initramfs/mkdxsinitrd b/installer/obsolete/mkdxsinitrd index 64c244e5..64c244e5 100755 --- a/initramfs/mkdxsinitrd +++ b/installer/obsolete/mkdxsinitrd |