diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-11-26 15:27:26 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2017-11-26 15:27:26 +0000 |
commit | 83fef3336a24cf93b9fd0d85de9fbea6dc3f5710 (patch) | |
tree | 8b25f1c16cc07a1b23f676489aa6c9dca6bfb703 /draklive2 | |
parent | 342062431ecd45a074a58ff8f1a2117241dba44a (diff) | |
download | drakiso-83fef3336a24cf93b9fd0d85de9fbea6dc3f5710.tar drakiso-83fef3336a24cf93b9fd0d85de9fbea6dc3f5710.tar.gz drakiso-83fef3336a24cf93b9fd0d85de9fbea6dc3f5710.tar.bz2 drakiso-83fef3336a24cf93b9fd0d85de9fbea6dc3f5710.tar.xz drakiso-83fef3336a24cf93b9fd0d85de9fbea6dc3f5710.zip |
draklive2: fix whitespace errors.
Diffstat (limited to 'draklive2')
-rwxr-xr-x | draklive2 | 108 |
1 files changed, 54 insertions, 54 deletions
@@ -90,14 +90,14 @@ sub build_syslinux_cfg { (map { my ($name, $cmdline) = @$_; $name =~ s/\s/_/g; - if ($name eq "harddisk") { - "label " . $name, - " com32 chain.c32 hd0 exit"; - } else { - "label " . ($name || $title), - " kernel $kernel", - " append initrd=$initrd $append $cmdline"; - } + if ($name eq "harddisk") { + "label " . $name, + " com32 chain.c32 hd0 exit"; + } else { + "label " . ($name || $title), + " kernel $kernel", + " append initrd=$initrd $append $cmdline"; + } } group_by2(@{$media->{boot_entries}})), "", ); @@ -173,7 +173,7 @@ sub install_system { ); $ENV{DRAKLIVE_LANGS} = join(':', get_langs($live)); run_({ targetarch => $live->{settings}{arch} }, - 'perl', $drakx_in_chroot, + 'perl', $drakx_in_chroot, $repository, $live->get_system_root, if_($live->{system}{auto_install}, '--auto_install', $live->{settings}{config_root} . '/' . $live->{system}{auto_install}), @@ -253,7 +253,7 @@ sub post_install_system { or die "unable to add media from $_->{path}\n"; @{$_->{packages} || []} or next; run_({ root => $live->get_system_root, targetarch => $live->{settings}{arch} }, - 'urpmi', '--auto', '--no-verify-rpm', if_(!$_->{distrib}, '--searchmedia', $_->{name}), @{$_->{packages}}) + 'urpmi', '--auto', '--no-verify-rpm', if_(!$_->{distrib}, '--searchmedia', $_->{name}), @{$_->{packages}}) or die "unable to install packages from $_->{path}\n"; } @@ -263,7 +263,7 @@ sub post_install_system { mkdir_p($live->get_system_root . $rpm_tmp_dir); cp_f((map { $live->{settings}{config_root} . '/' . $_ } @{$live->{system}{rpms}}), $live->get_system_root . $rpm_tmp_dir); run_({ root => $live->get_system_root, targetarch => $live->{settings}{arch} }, - 'urpmi', '--auto', '--no-verify-rpm', + 'urpmi', '--auto', '--no-verify-rpm', map { $rpm_tmp_dir . '/' . basename($_) } @{$live->{system}{rpms}}) or die "unable to install additional system rpms\n"; rm_rf($live->get_system_root . $rpm_tmp_dir); @@ -274,7 +274,7 @@ sub post_install_system { my $erase = join(' ', @{$live->{system}{erase_rpms} || []}); run_({ root => $live->get_system_root, targetarch => $live->{settings}{arch} }, - 'sh', '-c', "rpm -qa $erase | xargs rpm -e ") if $erase; + 'sh', '-c', "rpm -qa $erase | xargs rpm -e ") if $erase; run_({ root => $live->get_system_root }, 'systemctl', 'disable', $_ . '.service') foreach @{$live->{system}{disable_services}}; run_({ root => $live->get_system_root }, 'systemctl', 'disable', $_ . '.timer') foreach @{$live->{system}{disable_timers}}; @@ -339,7 +339,7 @@ sub post_install_system { remove_files_from($live->{media}{remove_files}, $live->get_builddir . $live->{prefix}{build}{files}); run_({ targetarch => $live->{settings}{arch} }, - "chroot", $live->get_system_root, "bash", "-c", $live->{system}{postInstall}) if $live->{system}{postInstall}; + "chroot", $live->get_system_root, "bash", "-c", $live->{system}{postInstall}) if $live->{system}{postInstall}; clean_system_conf_file($live, "/etc/resolv.conf"); write_dist_lists($live); @@ -519,10 +519,10 @@ sub create_initrd { umount_system_fs($live); if (need_media_specific_boot($live)) { - my $rootfs_initrd = $root . '/boot/' . $live->get_initrd_name; - my $media_initrd = $live->get_builddir . $live->{prefix}{build}{boot} . $live->{media}->get_initrd_path; - mkdir_p(dirname($media_initrd)); - mv($rootfs_initrd, $media_initrd) or die "can not move initrd: $!"; + my $rootfs_initrd = $root . '/boot/' . $live->get_initrd_name; + my $media_initrd = $live->get_builddir . $live->{prefix}{build}{boot} . $live->{media}->get_initrd_path; + mkdir_p(dirname($media_initrd)); + mv($rootfs_initrd, $media_initrd) or die "can not move initrd: $!"; } } @@ -537,18 +537,18 @@ sub create_bootloader { if ($live->{system}{gfxboot}) { mount_system_fs($live); - #- would be run by bootloader::add_boot_splash and make-boot-splash, but not called when we don't generate an initrd - run_({ root => $root }, '/usr/share/bootsplash/scripts/switch-themes', '-u'); - #- grub-gfxmenu would be run by bootloader::write_grub from DrakX - run_({ root => $root }, '/usr/sbin/grub-gfxmenu', '--update-gfxmenu'); - my $gfxmenu = $root . '/boot/gfxmenu'; - if (-e $gfxmenu) { - my $boot_dir = $live->get_builddir . $live->{prefix}{build}{boot}; - mkdir_p($boot_dir); - cp_f($gfxmenu, $boot_dir); - } else { - warn "no gfxmenu file\n"; - } + #- would be run by bootloader::add_boot_splash and make-boot-splash, but not called when we don't generate an initrd + run_({ root => $root }, '/usr/share/bootsplash/scripts/switch-themes', '-u'); + #- grub-gfxmenu would be run by bootloader::write_grub from DrakX + run_({ root => $root }, '/usr/sbin/grub-gfxmenu', '--update-gfxmenu'); + my $gfxmenu = $root . '/boot/gfxmenu'; + if (-e $gfxmenu) { + my $boot_dir = $live->get_builddir . $live->{prefix}{build}{boot}; + mkdir_p($boot_dir); + cp_f($gfxmenu, $boot_dir); + } else { + warn "no gfxmenu file\n"; + } umount_system_fs($live); } @@ -588,8 +588,8 @@ sub remove_unneeded_bootlogo_locales { if (!any { $file =~ /^$_\.tr$/ } @locales) { unlink $file; } else { - my ($locale_name) = $file =~ /(.*)\.tr$/; - push @kept_locales, $locale_name; + my ($locale_name) = $file =~ /(.*)\.tr$/; + push @kept_locales, $locale_name; } } system(qq(echo init 16x16.fnt *.tr |sed "s/ /\\n/g" |cpio -o >$bootlogo)); @@ -616,23 +616,23 @@ sub create_syslinux_msg_files { mkdir_p($syslinux_dir); if ($live->{system}{gfxboot}) { - my $product = common::parse_LDAP_namespace_structure(cat_($live->get_system_root . '/etc/product.id')); - my $default_gfxboot_theme = $product->{distribution}; - my $theme = do { + my $product = common::parse_LDAP_namespace_structure(cat_($live->get_system_root . '/etc/product.id')); + my $default_gfxboot_theme = $product->{distribution}; + my $theme = do { local $::prefix = $live->get_system_root; get_bootsplash_theme(); - }; - print "copying $default_gfxboot_theme gfxboot theme\n"; - cp_f(glob_($live->get_system_root . "/usr/share/gfxboot/themes/$default_gfxboot_theme/install/*"), $syslinux_dir); - if ($theme->{name} ne $default_gfxboot_theme) { - print "copying $theme->{name} gfxboot theme\n"; - cp_f(glob_($live->get_system_root . "/usr/share/gfxboot/themes/$theme->{name}/*"), $syslinux_dir); - } - my $bootlogo = $syslinux_dir . '/bootlogo'; - warn "unable to find gfxboot splash ($bootlogo)\n" if ! -f $bootlogo; - my @locales = remove_unneeded_bootlogo_locales($bootlogo, get_langs($live)); - output_p($syslinux_dir . '/langs', join("\n", @locales) . "\n"); - output_p($syslinux_dir . '/gfxboot.cfg', join("\n", + }; + print "copying $default_gfxboot_theme gfxboot theme\n"; + cp_f(glob_($live->get_system_root . "/usr/share/gfxboot/themes/$default_gfxboot_theme/install/*"), $syslinux_dir); + if ($theme->{name} ne $default_gfxboot_theme) { + print "copying $theme->{name} gfxboot theme\n"; + cp_f(glob_($live->get_system_root . "/usr/share/gfxboot/themes/$theme->{name}/*"), $syslinux_dir); + } + my $bootlogo = $syslinux_dir . '/bootlogo'; + warn "unable to find gfxboot splash ($bootlogo)\n" if ! -f $bootlogo; + my @locales = remove_unneeded_bootlogo_locales($bootlogo, get_langs($live)); + output_p($syslinux_dir . '/langs', join("\n", @locales) . "\n"); + output_p($syslinux_dir . '/gfxboot.cfg', join("\n", "livecd=1", "mainmenu.pos=210,235", "mainmenu.bar.minwidth=400", @@ -710,7 +710,7 @@ sub create_iso_master { $live->get_builddir . $live->{prefix}{build}{loopbacks} . $_; } list_selected_loopbacks($live)), if_($live->{media}{files}, - map { + map { $_ . '=' . $live->get_builddir . $live->{prefix}{build}{files} . '/' . $_; } all($live->get_builddir . $live->{prefix}{build}{files}) ), @@ -768,13 +768,13 @@ sub build_iso_image { run_({ chdir => $dir }, 'sha1sum', '>', $dest . '.sha1', $filename); run_({ chdir => $dir }, 'sha512sum', '>', $dest . '.sha512', $filename); run_({ chdir => $dir }, 'date', '>', $dir . '/DATE.txt'); - if (my $suffix = $live->get_set_suffix) { - if (my ($prefix, $ext) = $dest =~ /(.*)(\.[^.]+)$/) { - my $link = $prefix . $suffix . $ext; - linkf($dest, $link); - print "linked as $link\n"; - } - } + if (my $suffix = $live->get_set_suffix) { + if (my ($prefix, $ext) = $dest =~ /(.*)(\.[^.]+)$/) { + my $link = $prefix . $suffix . $ext; + linkf($dest, $link); + print "linked as $link\n"; + } + } } } |