mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
integrate-distro.sh: Persisting mkinitrd scripts
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
8f7af9564b
commit
b26ea56b4f
1 changed files with 39 additions and 21 deletions
|
|
@ -91,7 +91,6 @@ case $suse_version in
|
|||
ftp-server-run
|
||||
bprof-run
|
||||
"
|
||||
|
||||
# currently unused variable
|
||||
devel_pkgs="
|
||||
ant
|
||||
|
|
@ -128,7 +127,8 @@ case $suse_version in
|
|||
rpm_kernel_version=3.7.10~jng12-1
|
||||
|
||||
#kernel_version=3.9.9-jng20-1.2$kernel_flavour
|
||||
#rpm_kernel_version=3.9.9~jng20-1.2
|
||||
kernel_version=3.9.9-jng20$kernel_flavour
|
||||
rpm_kernel_version=3.9.9~jng20-1.2
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
@ -464,6 +464,9 @@ canonicalize()
|
|||
check_mount()
|
||||
{
|
||||
local canonicalized=`realpath $root/$1 2>/dev/null`
|
||||
#echo root="$root"
|
||||
#echo arg="$1"
|
||||
#echo canonicalized="$canonicalized"
|
||||
[ ! "$canonicalized" ] && return 1
|
||||
grep -q " $canonicalized " /proc/mounts && return 0
|
||||
canonicalized=`canonicalize $root/$1`
|
||||
|
|
@ -810,6 +813,7 @@ setup_boot_loader_local()
|
|||
local boot="($drivename,$grub_boot_partition_num)"
|
||||
local slash_boot="($drivename,$grub_slash_boot_partition_num)"
|
||||
local map=/tmp/$myname-grub-device.map
|
||||
local mkinitrd_sh=/root/bin/mkinitrd-local.sh
|
||||
|
||||
echo "($drivename) $install_dev" > $map
|
||||
#dd if=$root/boot/grub/stage1 of=$install_dev count=512 count=1
|
||||
|
|
@ -823,31 +827,45 @@ EOT
|
|||
make_sysconfig_bootloader > $root/etc/sysconfig/bootloader
|
||||
make_boot_menu > $root/boot/grub/menu.lst
|
||||
|
||||
run_chroot /sbin/mkinitrd \
|
||||
-B \
|
||||
-k /boot/vmlinuz-$kernel_version \
|
||||
-i /boot/initrd-local-$kernel_version \
|
||||
-M /boot/System.map-$kernel_version \
|
||||
-m "$initrd_modules" \
|
||||
-d $install_dev_root
|
||||
_cat << EOT > $root$mkinitrd_sh
|
||||
|#!/bin/sh
|
||||
|umask 0022
|
||||
|/sbin/mkinitrd \\
|
||||
| -B \\
|
||||
| -k /boot/vmlinuz-$kernel_version \\
|
||||
| -i /boot/initrd-local-$kernel_version \\
|
||||
| -M /boot/System.map-$kernel_version \\
|
||||
| -m "$initrd_modules" \\
|
||||
| -d $install_dev_root
|
||||
|ln -sf initrd-local-$kernel_version /boot/initrd-local)
|
||||
|chmod 644 /boot/initrd-local-$kernel_version
|
||||
EOT
|
||||
chmod 755 $root$mkinitrd_sh
|
||||
|
||||
(cd $root/boot; ln -sf initrd-local-$kernel_version initrd-local)
|
||||
run_chroot $mkinitrd_sh
|
||||
}
|
||||
|
||||
setup_boot_loader_net()
|
||||
{
|
||||
run_chroot /sbin/mkinitrd \
|
||||
-B \
|
||||
-k /boot/vmlinuz-$kernel_version \
|
||||
-i /boot/initrd-netboot-$kernel_version \
|
||||
-M /boot/System.map-$kernel_version \
|
||||
-m "$initrd_modules" \
|
||||
-d jan://blub/dings
|
||||
local mkinitrd_sh=/root/bin/mkinitrd-net.sh
|
||||
|
||||
# -s "853x480" is illegal in newer mkinitrd (as of SuSE 11.4)
|
||||
_cat << EOT > $root$mkinitrd_sh
|
||||
|#!/bin/sh
|
||||
|umask 0022
|
||||
|/sbin/mkinitrd \\
|
||||
| -B \\
|
||||
| -k /boot/vmlinuz-$kernel_version \\
|
||||
| -i /boot/initrd-netboot-$kernel_version \\
|
||||
| -M /boot/System.map-$kernel_version \\
|
||||
| -m "$initrd_modules" \\
|
||||
| -d jan://blub/dings
|
||||
|ln -sf initrd-netboot-$kernel_version /boot/initrd-netboot
|
||||
|ln -sf memtest.bin /boot/memtest
|
||||
|chmod 644 /boot/initrd-netboot-$kernel_version
|
||||
EOT
|
||||
chmod 755 $root$mkinitrd_sh
|
||||
|
||||
(cd $root/boot; ln -sf initrd-netboot-$kernel_version initrd-netboot)
|
||||
(cd $root/boot; ln -sf memtest.bin memtest)
|
||||
run_chroot $mkinitrd_sh
|
||||
}
|
||||
|
||||
undo_rpmnew()
|
||||
|
|
@ -1036,7 +1054,7 @@ cmd_install()
|
|||
*)
|
||||
;;
|
||||
esac
|
||||
run_chroot /opt/jux/bin/jux-init-namespace.sh
|
||||
[ -x $root/opt/jux/bin/jux-init-namespace.sh ] && run_chroot /opt/jux/bin/jux-init-namespace.sh
|
||||
run_chroot /sbin/ldconfig
|
||||
run_chroot install -m 755 -d /srv/nfs/var
|
||||
run_chroot install -m 777 -d /srv/nfs/var/cores
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue