OpenBSD-4.6/distrib/zaurus/ipk/postrm

#!/bin/sh
#	$OpenBSD: postrm,v 1.4 2006/04/04 00:25:58 uwe Exp $
#
# Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

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

# There is a chance that this file has not been installed by the
# postinst script, but what does it matter...
if [ -s /hdd2/bsd.rd ]; then
	rm -f /hdd2/bsd.rd
fi

mount -o remount,ro /