Deleted Added
full compact
var (136224) var (137451)
1#!/bin/sh
2#
3# Copyright (c) 1999 Matt Dillon
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
1#!/bin/sh
2#
3# Copyright (c) 1999 Matt Dillon
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:

--- 10 unchanged lines hidden (view full) ---

19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25# SUCH DAMAGE.
26#
27# $FreeBSD: head/etc/rc.d/var 136224 2004-10-07 13:55:26Z mtm $
27# $FreeBSD: head/etc/rc.d/var 137451 2004-11-09 10:03:17Z keramida $
28#
29
30# PROVIDE: var
31# REQUIRE: mountcritlocal
32
33. /etc/rc.subr
34
35name="var"

--- 20 unchanged lines hidden (view full) ---

56
57# If we do not have a writable /var, create a memory filesystem for /var
58# unless told otherwise by rc.conf. We don't have /usr yet so use mkdir
59# instead of touch to test. We want mount to record its mounts so we
60# have to make sure /var/db exists before doing the mount -a.
61#
62case "${varmfs}" in
63[Yy][Ee][Ss])
28#
29
30# PROVIDE: var
31# REQUIRE: mountcritlocal
32
33. /etc/rc.subr
34
35name="var"

--- 20 unchanged lines hidden (view full) ---

56
57# If we do not have a writable /var, create a memory filesystem for /var
58# unless told otherwise by rc.conf. We don't have /usr yet so use mkdir
59# instead of touch to test. We want mount to record its mounts so we
60# have to make sure /var/db exists before doing the mount -a.
61#
62case "${varmfs}" in
63[Yy][Ee][Ss])
64 mount_md ${varsize} /var
64 mount_md ${varsize} /var "${varmfs_flags}"
65 ;;
66[Nn][Oo])
67 ;;
68*)
69 if (/bin/mkdir -p /var/.diskless 2> /dev/null); then
70 rmdir /var/.diskless
71 else
65 ;;
66[Nn][Oo])
67 ;;
68*)
69 if (/bin/mkdir -p /var/.diskless 2> /dev/null); then
70 rmdir /var/.diskless
71 else
72 mount_md ${varsize} /var
72 mount_md ${varsize} /var "${varmfs_flags}"
73 fi
74esac
75
76
77# If we have an empty looking /var, populate it, but only if we have
78# /usr available. Hopefully, we'll eventually find a workaround, but
79# in realistic diskless setups, we're probably ok.
80case "${populate_var}" in

--- 16 unchanged lines hidden ---
73 fi
74esac
75
76
77# If we have an empty looking /var, populate it, but only if we have
78# /usr available. Hopefully, we'll eventually find a workaround, but
79# in realistic diskless setups, we're probably ok.
80case "${populate_var}" in

--- 16 unchanged lines hidden ---