All pastes #1027105 Raw Edit

clueless

public text v1 · immutable
#1027105 ·published 2008-05-23 14:40 UTC
rendered paste body
Command: cat /mnt/p3/home/kerndocs/cpio-playtime/init#!/bin/shecho "Loading, please wait..."mkdir /sysmkdir /procmkdir /tmpmkdir -p /var/lockmount -t sysfs none /sysmount -t proc none /proc# Note that this only becomes /dev on the real filesystem if udev's scripts# are used; which they will be, but it's worth pointing outtmpfs_size="10M"if [ -e /etc/udev/udev.conf ]; then	. /etc/udev/udev.conffimount -t tmpfs -o size=$tmpfs_size,mode=0755 udev /dev> /dev/.initramfs-toolsmkdir /dev/.initramfsmknod /dev/console c 5 1mknod /dev/null c 1 3# Export the dpkg architectureexport DPKG_ARCH=. /conf/arch.conf# Export it for root hardcodingexport ROOT=# Bring in the main config. /conf/initramfs.conffor i in conf/conf.d/*; do	[ -f ${i} ] && . ${i}done. /scripts/functions# Parse command line optionsexport break=export init=/sbin/initexport quiet=nexport readonly=yexport rootmnt=/rootexport debug=export cryptopts=${CRYPTOPTS}for x in $(cat /proc/cmdline); do	case $x in	init=*)		init=${x#init=}		;;	root=*)		ROOT=${x#root=}		case $ROOT in		LABEL=*)			ROOT="/dev/disk/by-label/${ROOT#LABEL=}"			;;		UUID=*)			ROOT="/dev/disk/by-uuid/${ROOT#UUID=}"			;;		esac		;;	rootflags=*)		ROOTFLAGS="-o ${x#rootflags=}"		;;	cryptopts=*)		cryptopts="${x#cryptopts=}"		;;	nfsroot=*)		NFSROOT="${x#nfsroot=}"		;;	nfsopts=*)		NFSOPTS="-o ${x#nfsopts=}"		;;	boot=*)		BOOT=${x#boot=}		;;	resume=*)		RESUME=${x#resume=}		;;	noresume)		NORESUME=y		;;	quiet)		quiet=y		;;	ro)		readonly=y		;;	rw)		readonly=n		;;	debug)		debug=y		exec >/tmp/initramfs.debug 2>&1		set -x		;;	break=*)		break=${x#break=}		;;	break)		break=premount		;;	esacdoneif [ -z ${NORESUME} ]; then	export resume=${RESUME}fidepmod -amaybe_break top# Don't do log messages here to avoid confusing usplashrun_scripts /scripts/init-topmaybe_break moduleslog_begin_msg "Loading essential drivers..."load_moduleslog_end_msgmaybe_break premount[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-premount"run_scripts /scripts/init-premount[ "$quiet" != "y" ] && log_end_msgmaybe_break mountlog_begin_msg "Mounting root file system...". /scripts/${BOOT}parse_numeric ${ROOT}mountrootlog_end_msgmaybe_break bottom[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom"run_scripts /scripts/init-bottom[ "$quiet" != "y" ] && log_end_msg# Move virtual filesystems over to the real filesystemmount -n -o move /sys ${rootmnt}/sysmount -n -o move /proc ${rootmnt}/procwhile [ ! -x ${rootmnt}${init} ]; do	panic "Target filesystem doesn't have ${init}"done# Confuses /etc/init.d/rcif [ -n ${debug} ]; then	unset debugfi# Chain to real filesystemmaybe_break initexec run-init ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console