mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-27 15:33:55 +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
|
ftp-server-run
|
||||||
bprof-run
|
bprof-run
|
||||||
"
|
"
|
||||||
|
|
||||||
# currently unused variable
|
# currently unused variable
|
||||||
devel_pkgs="
|
devel_pkgs="
|
||||||
ant
|
ant
|
||||||
|
|
@ -128,7 +127,8 @@ case $suse_version in
|
||||||
rpm_kernel_version=3.7.10~jng12-1
|
rpm_kernel_version=3.7.10~jng12-1
|
||||||
|
|
||||||
#kernel_version=3.9.9-jng20-1.2$kernel_flavour
|
#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
|
esac
|
||||||
|
|
||||||
|
|
@ -464,6 +464,9 @@ canonicalize()
|
||||||
check_mount()
|
check_mount()
|
||||||
{
|
{
|
||||||
local canonicalized=`realpath $root/$1 2>/dev/null`
|
local canonicalized=`realpath $root/$1 2>/dev/null`
|
||||||
|
#echo root="$root"
|
||||||
|
#echo arg="$1"
|
||||||
|
#echo canonicalized="$canonicalized"
|
||||||
[ ! "$canonicalized" ] && return 1
|
[ ! "$canonicalized" ] && return 1
|
||||||
grep -q " $canonicalized " /proc/mounts && return 0
|
grep -q " $canonicalized " /proc/mounts && return 0
|
||||||
canonicalized=`canonicalize $root/$1`
|
canonicalized=`canonicalize $root/$1`
|
||||||
|
|
@ -810,6 +813,7 @@ setup_boot_loader_local()
|
||||||
local boot="($drivename,$grub_boot_partition_num)"
|
local boot="($drivename,$grub_boot_partition_num)"
|
||||||
local slash_boot="($drivename,$grub_slash_boot_partition_num)"
|
local slash_boot="($drivename,$grub_slash_boot_partition_num)"
|
||||||
local map=/tmp/$myname-grub-device.map
|
local map=/tmp/$myname-grub-device.map
|
||||||
|
local mkinitrd_sh=/root/bin/mkinitrd-local.sh
|
||||||
|
|
||||||
echo "($drivename) $install_dev" > $map
|
echo "($drivename) $install_dev" > $map
|
||||||
#dd if=$root/boot/grub/stage1 of=$install_dev count=512 count=1
|
#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_sysconfig_bootloader > $root/etc/sysconfig/bootloader
|
||||||
make_boot_menu > $root/boot/grub/menu.lst
|
make_boot_menu > $root/boot/grub/menu.lst
|
||||||
|
|
||||||
run_chroot /sbin/mkinitrd \
|
_cat << EOT > $root$mkinitrd_sh
|
||||||
-B \
|
|#!/bin/sh
|
||||||
-k /boot/vmlinuz-$kernel_version \
|
|umask 0022
|
||||||
-i /boot/initrd-local-$kernel_version \
|
|/sbin/mkinitrd \\
|
||||||
-M /boot/System.map-$kernel_version \
|
| -B \\
|
||||||
-m "$initrd_modules" \
|
| -k /boot/vmlinuz-$kernel_version \\
|
||||||
-d $install_dev_root
|
| -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()
|
setup_boot_loader_net()
|
||||||
{
|
{
|
||||||
run_chroot /sbin/mkinitrd \
|
local mkinitrd_sh=/root/bin/mkinitrd-net.sh
|
||||||
-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
|
|
||||||
|
|
||||||
# -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)
|
run_chroot $mkinitrd_sh
|
||||||
(cd $root/boot; ln -sf memtest.bin memtest)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
undo_rpmnew()
|
undo_rpmnew()
|
||||||
|
|
@ -1036,7 +1054,7 @@ cmd_install()
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
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 /sbin/ldconfig
|
||||||
run_chroot install -m 755 -d /srv/nfs/var
|
run_chroot install -m 755 -d /srv/nfs/var
|
||||||
run_chroot install -m 777 -d /srv/nfs/var/cores
|
run_chroot install -m 777 -d /srv/nfs/var/cores
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue