#!/bin/sh # $Id$ # PROVIDE: mdinit # BEFORE: FILESYSTEMS # REQUIRE: mountcritlocal # KEYWORD: FreeBSD . /etc/rc.subr name="mdinit" start_cmd="mdinit_start" stop_cmd=":" mdinit_start() { if [ -f /.usr.tar.xz ]; then /sbin/mount -t tmpfs tmpfs /usr /rescue/xz -d -c /.usr.tar.xz | /rescue/tar -x -C / -f - elif [ -f /.usr.tar.bz2 ]; then /sbin/mount -t tmpfs tmpfs /usr /rescue/bzip2 -d -c /.usr.tar.bz2 | /rescue/tar -x -C / -f - elif [ -f /.usr.tar.gz ]; then /sbin/mount -t tmpfs tmpfs /usr /rescue/gzip -d -c /.usr.tar.gz | /rescue/tar -x -C / -f - fi #/sbin/mount -t tmpfs tmpfs /var/db/pkg #mkdir -p /var/cache/pkg #/sbin/mount -t tmpfs tmpfs /var/cache/pkg } load_rc_config $name run_rc_command "$1"