Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 38f65ea438a86e0d7c0fb045e4c010b1 > files > 230

initng-ifiles-0.1.5-4.fc12.x86_64.rpm

#!/sbin/itype
# This is a i file, used by initng parsed by install_service

# NAME: 
# DESCRIPTION: 
# WWW: 

# Unmount and free the initrd.
service system/initrd-tools {
	need = system/initial;
	script start = {
		. /etc/default/initrd-tools.sh
		[ "${KEEPINITRD}" = yes ] && exit
		command -v blockdev >/dev/null 2>&1 || exit 0

		if ! [ -f /proc/mounts ]
		then
			mount -n -t proc proc /proc || exit 1
			trap 'umount -n /proc' EXIT
		fi

		/bin/grep -q '^[^ ]* /initrd ' /proc/mounts || exit 0

		if [ -c /initrd/dev/.devfsd ]
		then
			umount /initrd/dev || exit 1
		fi
		umount /initrd || exit 1

		if [ -b /dev/ram0 ]
		then
			blockdev --flushbufs /dev/ram0
		elif [ -b /dev/rd/0 ]
		then
			blockdev --flushbufs /dev/rd/0
		else
			echo "Cannot find initrd device" >&2
			exit 1
		fi
	};
}