i.voldconf revision 7c478bd95313f5f23a4c958a745db2134aa03244
824N/A# The contents of this file are subject to the terms of the 824N/A# Common Development and Distribution License, Version 1.0 only 824N/A# (the "License"). You may not use this file except in compliance 824N/A# See the License for the specific language governing permissions 824N/A# and limitations under the License. 824N/A# When distributing Covered Code, include this CDDL HEADER in each 824N/A# If applicable, add the following below this CDDL HEADER, with the 824N/A# fields enclosed by brackets "[]" replaced with your own identifying 824N/A# information: Portions Copyright [yyyy] [name of copyright owner] 824N/A#ident "%Z%%M% %I% %E% SMI" 824N/A# Copyright (c) 1996-1999 by Sun Microsystems, Inc. 824N/A # add the new remount lines after the notify line 824N/A# 2. new line to go after last 'use ...' line; 824N/A# 3. old line to delete; 824N/A# if the "$new" line is already in the file "$d", then return, else 824N/A# find the line number of the last "use ..." line in the "$d" file 824N/A# add the supplied "$new" line after the current last "use ..." line 824N/A# if the "$old" line is in the file, remove it 824N/A # check for the "$new line" 824N/A return # no work needs to be done 824N/A # find last '^use ...' line 824N/A # add new line after last '^use ...' line 824N/A # copy temp file back to dest file, removing old line (if present) 824N/A# - find the current "notify ..." line 824N/A# - if the current line ends with "-c" and the line has no 'use=' 824N/A# - change the "-c" to a "-p", and 824N/A# - add a 'user=root' clause 824N/A # get the current notify line 824N/A return # not an orig line -- just leave it alone 824N/A # check for not having a 'user=' clause 824N/A return # not an orig line -- just leave it alone 824N/A # update the notify line to have a 'user=root' and a '-p' 824N/A # get the line and check if up to date 824N/A sed -e '/^label sun label_sun/ s/$/ rmscsi/' \ 824N/A # get the line and check if up to date 824N/A sed -e '/^label dos label_dos/ s/$/ rmscsi/' \ # save the 'ident' line from the 'new' file # save all but the 'ident' line from the old (orig) file # concatenate the new ident and the old data, replacing old # get the new 'use cdrom ...' line # ensure that default cdrom line is up to date # get the new 'use floppy ...' line # ensure that default floppy line is up to date # get the new 'use rmscsi ...' line # ensure that default floppy line is up to date '# there is no old rmscsi line' # update the volmissing line (if it hasn't changed) # update the action lines # ensure that the label_dos and label_sun lines are current # ensure unsafe line has udfs # replace "rmscsi" with "rmdisk" everywhere in the file # add the new "remount" lines # restore permissions if they changed