preinstall revision 69ed0c8ece2346b34605e2c9567c9f7b0dad5dc8
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# CDDL HEADER START
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# The contents of this file are subject to the terms of the
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# Common Development and Distribution License (the "License").
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# You may not use this file except in compliance with the License.
d63de4508a08b11f57c307a15eda3cd95485bf2cvboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d63de4508a08b11f57c307a15eda3cd95485bf2cvboxsync# See the License for the specific language governing permissions
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# and limitations under the License.
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# When distributing Covered Code, include this CDDL HEADER in each
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# If applicable, add the following below this CDDL HEADER, with the
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# fields enclosed by brackets "[]" replaced with your own identifying
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# CDDL HEADER END
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# Use is subject to license terms.
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# remove_minor - removes minor node in /dev for passed driver
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# Usage: remove_minor {driver_name}
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# We remove any dangling /dev links in this order:
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# remove all traces of the former pcmcia nexus. This allows upgrade
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsync# to work and not leave the system unbootable
4bc1bbf45f30ff3ca38c2ad006836e490972c7ccvboxsyncgrep pcmcia ${BASEDIR}/etc/name_to_major >/dev/null &&
0700964a23df46033c8149ee10ce643cd3677061vboxsync[ -c ${BASEDIR}/dev/pcmcia ] && rm -f ${BASEDIR}/dev/pcmcia
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync# make sure we don't have left over /dev/ra, /dev/pcic or /dev/stp4020
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync[ ! -h ${BASEDIR}/dev/ra ] && rm -f ${BASEDIR}/dev/ra
5f9dfb422a6ed57822f9c0cb94fa7df8d24acc9bvboxsync[ ! -h ${BASEDIR}/dev/pcic ] && rm -f ${BASEDIR}/dev/pcic