resolv revision 66830
166830Sobrien#!/bin/sh 266830Sobrien# 366830Sobrien# Copyright (c) 1999 Matt Dillon 466830Sobrien# All rights reserved. 566830Sobrien# 666830Sobrien# Redistribution and use in source and binary forms, with or without 766830Sobrien# modification, are permitted provided that the following conditions 866830Sobrien# are met: 966830Sobrien# 1. Redistributions of source code must retain the above copyright 1066830Sobrien# notice, this list of conditions and the following disclaimer. 1166830Sobrien# 2. Redistributions in binary form must reproduce the above copyright 1266830Sobrien# notice, this list of conditions and the following disclaimer in the 1366830Sobrien# documentation and/or other materials provided with the distribution. 1466830Sobrien# 1566830Sobrien# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1666830Sobrien# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1766830Sobrien# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1866830Sobrien# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1966830Sobrien# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2066830Sobrien# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2166830Sobrien# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2266830Sobrien# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2366830Sobrien# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2466830Sobrien# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2551237Speter# $FreeBSD: head/etc/rc.d/resolv 66830 2000-10-08 19:20:36Z obrien $ 2651231Ssheldonh# 2766830Sobrien# $FreeBSD: head/etc/rc.d/resolv 66830 2000-10-08 19:20:36Z obrien $ 2866830Sobrien# 2943803Sdillon 3043803Sdillon# PROVIDE: diskless 3143803Sdillon# REQUIRE: initdiskless mountcritlocal 3243803Sdillon if [ -n "$4" ]; then 3343803Sdillon bpi="-i $4" 3451231Ssheldonh fi 3543849Sjkh /sbin/mdconfig -a -t malloc -s $1 -u $3 3659674Ssheldonh /sbin/disklabel -r -w md$3 auto 3751231Ssheldonh /sbin/newfs $bpi /dev/md$3c 3843849Sjkh /sbin/mount /dev/md$3c $2 3943803Sdillon} 4043803Sdillon 4155520Sluigimount_mfs -s ${varsize:=65536} -T qp120at dummy /var 4255520Sluigivar_dirs="run dev db msgs tmp spool spool/mqueue spool/lpd spool/output \ 4355520Sluigi spool/output/lpd" 4455520Sluigifor i in ${var_dirs} 4555520Sluigido 4655520Sluigi mkdir /var/${i} 4755520Sluigidone 4843803Sdillonchmod 755 /var/run 4943803Sdillonchmod 755 /var/db 5043803Sdillonchmod 755 /var/spool 5143803Sdillonchmod 1777 /var/tmp 5255520Sluigichown -R root.daemon /var/spool/output 5355520Sluigichgrp daemon /var/spool/lpd 5455520Sluigi# Since we are starting with a very fresh /etc on an MFS: 5555520Sluigiif [ -d /conf/default/etc ]; then 5655520Sluigi newaliases 5743803Sdillonfi 5843803Sdillonif [ ! -h /tmp -a ! -h /var/tmp ]; then 5943803Sdillon mount_null /var/tmp /tmp 6043803Sdillonfi 6143803Sdillon# 6255520Sluigi# extract a list of device entries, then copy them to a writable partition 6351231Ssheldonh(cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp 6443803Sdillonmount_mfs -s 4096 -i 512 -T qp120at dummy /dev 6551231Ssheldonh(cd /; cpio -i -H newc -d < /tmp/dev.tmp) 6643803Sdillon # extract a list of device entries, then copy them to a writable fs 6743803Sdillon (cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp 6843803Sdillon mount_md 4096 /dev 3 512 6943803Sdillon (cd /; cpio -i -H newc -d < /tmp/dev.tmp) 7043803Sdillonfi 71