diff options
author | 2005-03-18 21:46:13 +0000 | |
---|---|---|
committer | 2005-03-18 21:46:13 +0000 | |
commit | b97bdd4e00d69386636ef3f9a6aa5bcb136ee4d8 (patch) | |
tree | 04ad095362031063918819cadddf271ffbb07599 | |
parent | use IFQ_* instead of IF_* for the data queue (diff) | |
download | wireguard-openbsd-b97bdd4e00d69386636ef3f9a6aa5bcb136ee4d8.tar.xz wireguard-openbsd-b97bdd4e00d69386636ef3f9a6aa5bcb136ee4d8.zip |
Patch Linux startup script to run zboot automatically, but do not
restore the original file when uninstalling the package.
To boot OpenBSD, hit enter at the zboot> prompt after reboot.
To boot Linux, type 'r' at the prompt.
-rw-r--r-- | distrib/zaurus/ipk/postinst | 34 | ||||
-rw-r--r-- | distrib/zaurus/ipk/postrm | 11 |
2 files changed, 39 insertions, 6 deletions
diff --git a/distrib/zaurus/ipk/postinst b/distrib/zaurus/ipk/postinst index 22e508779b5..d1125213288 100644 --- a/distrib/zaurus/ipk/postinst +++ b/distrib/zaurus/ipk/postinst @@ -1,12 +1,34 @@ #!/bin/sh + +cd /root/etc/rc.d || exit $? + rmmod zbsdmod 2>/dev/null + mount -o remount,rw / -rm -f /root/etc/rc.d/rc.zboot -rm -f /root/etc/rc.d/zboot -rm -f /root/etc/rc.d/zbsdmod.o -cp /hdd2/OpenBSD/rc.zboot /root/etc/rc.d -cp /hdd2/OpenBSD/zboot /root/etc/rc.d -cp /hdd2/OpenBSD/zbsdmod.o /root/etc/rc.d + +if [ ! -f rc.rofilesys.openbsd ]; then + cp -p rc.rofilesys rc.rofilesys.openbsd +fi + +cat rc.rofilesys | sed -e '/vfat/s/^/#/' > tmp || exit $? +mv tmp rc.rofilesys +cat rc.rofilesys | sed -e '/^LINUXFMT=ext3$/s/^/#/' \ + -e '/^#LINUXFMT=ext2$/s/^#//' > tmp || exit $? +mv tmp rc.rofilesys +cat rc.rofilesys | sed \ + -e '/\/pcmcia start$/s,$,; sh /root/etc/rc.d/rc.zboot,' > tmp || exit $? +mv tmp rc.rofilesys +chown root:root rc.rofilesys +chmod 775 rc.rofilesys + +rm -f rc.zboot +rm -f zboot +rm -f zbsdmod.o +cp /hdd2/OpenBSD/rc.zboot . +cp /hdd2/OpenBSD/zboot . +cp /hdd2/OpenBSD/zbsdmod.o . + sync; sleep 3 mount -o remount,ro / + insmod /hdd2/OpenBSD/zbsdmod.o diff --git a/distrib/zaurus/ipk/postrm b/distrib/zaurus/ipk/postrm index 6091fb70511..9374cb70e52 100644 --- a/distrib/zaurus/ipk/postrm +++ b/distrib/zaurus/ipk/postrm @@ -1,7 +1,18 @@ #!/bin/sh + rmmod zbsdmod + +cd /root/etc/rc.d || exit $? + mount -o remount,rw / + rm -f /root/etc/rc.d/rc.zboot rm -f /root/etc/rc.d/zboot rm -f /root/etc/rc.d/zbsdmod.o + +# XXX removing ext2/ext3 and vfat hacks can cause HDD1 Error and such. +#if [ -f /root/etc/rc.d/rc.rofilesys.openbsd ]; then +# mv -f /root/etc/rc.d/rc.rofilesys.openbsd /root/etc/rc.d/rc.rofilesys +#fi + mount -o remount,ro / |