main/s390-tools: no need custom script for zipl

The original idea of having this custom script for zipl is when running
setup-disk, I did not realize that we could inject zipl config to new
sysroot's /etc/zipl.conf (effectively $mnt/etc/zipl.conf. See more at
https://github.com/alpinelinux/alpine-conf/pull/14).

It was easy for dev purposes but not ideal for production (cannot just
update bootloader parms from /proc/cmdline).
This commit is contained in:
Tuan M. Hoang 2018-05-30 10:07:42 +00:00 committed by Natanael Copa
parent 92aae8391b
commit 134029dab3
3 changed files with 3 additions and 48 deletions

View File

@ -2,7 +2,7 @@
# Maintainer: Tuan M. Hoang <tmhoang@flatglobe.org>
pkgname=s390-tools
pkgver=1.37.0
pkgrel=2
pkgrel=3
pkgdesc="Utilities for Linux on IBM z Systems"
url="http://www.ibm.com/developerworks/linux/linux390/s390-tools.html"
arch="s390x"
@ -29,8 +29,6 @@ source="http://download.boulder.ibm.com/ibmdl/pub/software/dw/linux390/ht_src/$p
0200-dasdinfo-gnu-ext-hack.patch
0300-disable-program-using-gnu-ext.patch
s390-tools-script
"
builddir="$srcdir/$pkgname-$pkgver"
@ -45,7 +43,6 @@ build() {
package() {
cd "$builddir"
make HAVE_SNMP=0 HAVE_PFM=0 DESTDIR="$pkgdir" install
install -m 755 "$srcdir"/s390-tools-script "$pkgdir"/sbin/s390-tools-script
}
sha512sums="3667ba4eb7e2b74629958f530002953adebe6e41d6429c99ae5f82d1406d6963aacdc35b63114683c365b9fa40ac32b4c22f226918ecb53423e80f944d24cb9c s390-tools-1.37.0.tar.bz2
@ -62,5 +59,4 @@ d4d707aadf095f48dd3ae79f60d17194e479d8a6ca08c6b6d64582e6d09b33d7d065a7349cc7fe61
d879173250fc0cabef198785923248e6832158e38d6ea9ef615f14e2d6698810b54c38c8327f20b2c43d8d509a274b27a7c0ad999a0c0bed2743715f21ab859a 0100-zipl-no-pie.patch
1cbbe3fe265c7d4164143d24c532c18b354be4bc295ad24064d379660e43a475b7d678b458cdf74ffdb44d6cd38a497dbe00758d688c547c6ece63b6dee091b7 0101-zipl-dont-optimize-size.patch
4ce15b615ff08e5c0a23d3c3b19d1e9d6362239fb731e67fa68e6cd108cfdeaaf16186c5416cc211082aa60c4d1946b930b9ea4c300458da98e9a701feed99c3 0200-dasdinfo-gnu-ext-hack.patch
6736ca9deb25838511e715e96d1f5bfc283460689e767181463d1827c80be200b1375708ff48772599083b14f74594f7053cf30fcc6c93ba7fa5dfae832434de 0300-disable-program-using-gnu-ext.patch
1c7d757a9d887aca3e0eedce9211c8f5456ef0e95a9e414eed5ea8195b156db43776c19eb240a14ebb3d306604edb6f959fa1a698168695c4ca22c9a73a7f172 s390-tools-script"
6736ca9deb25838511e715e96d1f5bfc283460689e767181463d1827c80be200b1375708ff48772599083b14f74594f7053cf30fcc6c93ba7fa5dfae832434de 0300-disable-program-using-gnu-ext.patch"

View File

@ -1,41 +0,0 @@
#!/bin/sh
[ "$#" -lt 1 ] && exit 0
find_mount_dev() {
local mnt="$1"
awk "\$2 == \"$mnt\" { print \$1 }" /proc/mounts | tail -n 1
}
zipl_gen_conf() {
KERNEL_FLAVOR="-vanilla"
RAMDISK_FLAVOR="-vanilla"
rootdev=$(find_mount_dev "/")
root_parm="root=$rootdev"
_tmpfile="$(mktemp)"
cat /proc/cmdline | tr A-Z a-z | xargs -n 1 | grep '=' > "$_tmpfile"
. "$_tmpfile" > /dev/null 2>&1
rm "$_tmpfile"
cat > /etc/zipl.conf <<- EOF
[defaultboot]
defaultauto
prompt=1
timeout=5
default=linux
target=/boot
[linux]
image=/boot/vmlinuz$KERNEL_FLAVOR
ramdisk=/boot/initramfs$RAMDISK_FLAVOR
parameters="$root_parm dasd=$dasd s390x_net=$s390x_net"
EOF
}
zipl_run() {
zipl_gen_conf
/sbin/zipl --verbose
}
"$1"

View File

@ -1,4 +1,4 @@
#!/bin/sh
/sbin/s390-tools-script zipl_run
/sbin/zipl --verbose