integrate-distro.sh: Initrd modules and startup beautification

- Add support for configuration of initrd modules
- Password file is now only initialized for install command

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2016-11-14 14:24:57 +00:00
commit e461dbcaa8

View file

@ -12,6 +12,8 @@ cwd=`pwd`
ssh_auth_sock=/tmp/agent-host.sock
env_ssh_auth_sock=$SSH_AUTH_SOCK
initrd_modules=" via-rhine r8169 e1000 e1000e b44 myri10ge forcedeth 8139too sata_nv nfs nfs_acl auth_rpcgss nfsv3 nfsv4 fscache lockd sunrpc sis edd sisfb evdev shpchp sis_agp hwmon ahci libahci usbhid hid uhci_hcd ohci_hcd ehci_hcd usbcore hid-generic"
initrd_modules_local="$initrd_modules"
initrd_modules_net="$initrd_modules"
config_script=
#kernel_flavour=-desktop
@ -608,6 +610,12 @@ cfg_default()
#jengelh 0 ftp://ftp/pub/mirror/gwdg/pub/linux/misc/suser-jengelh/openSUSE_$suse_version
#videolan 0 ftp://ftp/pub/mirror/videolan/pub/videolan/vlc/SuSE/$suse_version
[initrd.local.modules]
$initrd_modules_local
[initrd.net.modules]
$initrd_modules_net
[fstab]
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
@ -1097,6 +1105,7 @@ setup_boot_loader_local()
local slash_boot="($drivename,$grub_slash_boot_partition_num)"
local map=/tmp/$myname-grub-device.map
local mkinitrd_sh=/root/bin/mkinitrd-local.sh
local modules=`cfg_section initrd.local.modules`
echo "($drivename) $install_dev" > $map
#dd if=$root/boot/grub/stage1 of=$install_dev count=512 count=1
@ -1118,7 +1127,7 @@ EOT
| -k /boot/vmlinuz-$kernel_version \\
| -i /boot/initrd-local-$kernel_version \\
| -M /boot/System.map-$kernel_version \\
| -m "$initrd_modules" \\
| -m "$modules" \\
| -d $install_dev_root
|ln -sf initrd-local-$kernel_version /boot/initrd-local
|chmod 644 /boot/initrd-local-$kernel_version
@ -1131,6 +1140,7 @@ EOT
setup_boot_loader_net()
{
local mkinitrd_sh=/root/bin/mkinitrd-net.sh
local modules=`cfg_section initrd.net.modules`
_cat << EOT > $root$mkinitrd_sh
|#!/bin/sh
@ -1140,7 +1150,7 @@ setup_boot_loader_net()
| -k /boot/vmlinuz-$kernel_files_version \\
| -i /boot/initrd-netboot-$kernel_files_version \\
| -M /boot/System.map-$kernel_files_version \\
| -m "$initrd_modules" \\
| -m "$modules" \\
| -d jan://blub/dings
|ln -sf initrd-netboot-$kernel_files_version /boot/initrd-netboot
|ln -sf memtest.bin /boot/memtest
@ -1366,8 +1376,6 @@ host_files=""
declare -A hooks
get_opts "$@"
init_root_password_file
case $arch in
i386|i586|i686)
case `uname -m` in
@ -1399,6 +1407,10 @@ root-dir)
echo $root
exit $?
;;
install)
init_root_password_file
# fall throuth
;;
*)
;;
esac