⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ask_filesys

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻
📖 第 1 页 / 共 2 页
字号:
	case "$swap2_d$swap2_u" in	"$root_d$root_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$root_p'" ) print $5}' | sed s/,/\ /g`		availp=`delet_part "$avoidp" "$availp"`		;;	esac	case "$swap2_d$swap2_u" in	"$usr_d$usr_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$usr_p'" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp $usr_p"		availp=`delet_part "$avoidp" "$availp"`		;;	esac	case "$swap2_d$swap2_u" in	"$swap1_d$swap1_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$swap1_p'" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp $swap1_p"		availp=`delet_part "$avoidp" "$availp"`		;;	esac	part=`size_part "$availp" 0`	case $part in	"" )		echo "${LL}${ERMSG11}"		continue		;;	esac	def_part=x		case $DEF_PT in	1 )	case $swap2_d$swap2_u in		$root_d$root_u )				def_part=b	;;		esac		;;	esac	>/tmp/partsize	for k in $part	do	 	awk '{if ($1 == "'$k'") {yy=$1; xx=$4/2; zz=$5}} END \{printf "    %s\t  --- \t%9d\t%s\n",yy,xx,zz}' /tmp/ptable >>/tmp/partsize	done	part=`cat /tmp/partsize`		swap2_p=`ask_part "$part" "swap2 space" "$swap2_d$swap2_u" $def_part`	breakdone## for the dump area#while : truedo	echo "*** ALLOCATE THE CRASH DUMP SPACE ***You can allocate the crash dump space to one of the disks listed in thetable below.  See the Guide to Installing ULTRIX for an explanation ofthis table: "	ROUTINE="CRASH DUMP SPACE ALLOCATION"	export ROUTINE	DUMP=`finder -f`	set xx $DUMP	dump_D=$2; dump_d=$3; dump_u=$4	while :	do		echo -n "You selected ${dump_D}, device number ${dump_u}.  Make sure this disk ison line and write-enabled (if applicable to this drive) and thenconfirm your choice.Use ${dump_D}, ${dump_d}${dump_u} for crash dump space? (y/n) []: "		read ANS		ANS=`echo $ANS`		case $ANS in		Y | y )			PASS=			break			;;		N | n )			continue 2			;;		* )			echo "You must answer 'y' or 'n' to the following question."			continue			;;		esac	done	case $dump_d$dump_u in	$media_d$media_u )		echo "You attempted to allocate the dump space on ${media_d}${media_u}, whichcontains your distribution medium."		continue		;;	$root_d$root_u | $usr_d$usr_u | $swap1_d$swap1_u | $swap2_d$swap2_u )			;;	* )		(cd /dev; MAKEDEV $dump_d$dump_u  >/dev/null)		;;	esac       dd if=/dev/r${dump_d}${dump_u}c of=/tmp/wrdisk count=1 >/dev/null 2>&1 ||	{		echo "The $dump_D, $dump_d$dump_u is not accessible.  Make sure the device ison-line and write enabled."		continue	}       dd if=/tmp/wrdisk of=/dev/r${dump_d}${dump_u}c count=1 >/dev/null 2>&1 ||	{		echo "The $dump_D, $dump_d$dump_u must be write enabled. "		continue	}	/etc/chpt -q /dev/r${dump_d}${dump_u}c | sed 1,3d > /tmp/ptable	case $? in	0 )	;;	* )		echo "The chpt command failed. Contact your DIGITAL representative."		exit 1 ;;	esac	availp="a b c d e f g h"	case "$dump_d$dump_u" in	"$root_d$root_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$root_p'" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp $root_p"		availp=`delet_part "$avoidp" "$availp"`		;;	esac	case "$dump_d$dump_u" in	"$usr_d$usr_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$usr_p'" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp $usr_p"		availp=`delet_part "$avoidp" "$availp"`		;;	esac	case "$dump_d$dump_u" in	"$swap1_d$swap1_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$swap1_p'" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp $swap1_p"		availp=`delet_part "$avoidp" "$availp"`		;;	esac	case "$dump_d$dump_u" in	"$swap2_d$swap2_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$swap2_p'" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp $swap2_p"		availp=`delet_part "$avoidp" "$availp"`		;;	esac### dump area can be the same as swap area.	case $dump_d$dump_u in	$swap1_d$swap1_u )		swap1_flg=0		for p in "$availp"		do			case $p in			$swap1_p )				swap1_flg=1 				break				;;			esac		done		case $swap1_flg in		0 )			availp="$availp $swap1_p"			;;		esac		;;	esac	case $dump_d$dump_u in	$swap2_d$swap2_u )		swap2_flg=0		for p in "$availp" 		do			case $p in			$swap2_p )				swap2_flg=1 				break				;;			esac		done		case $swap2_flg in		0 )			availp="$availp $swap2_p"			;;		esac		;;	esac	part=`size_part "$availp" $DUMPSIZE`	case $part in	"" )		echo "${ERMSG11}"		continue		;;	esac	def_part=x		case $DEF_PT in	1 )		case $dump_d$dump_u in		$root_d$root_u )				def_part=b	;;		esac		;;	esac	>/tmp/partsize	for k in $part	do	 	awk '{if ($1 == "'$k'") {yy=$1; xx=$4/2; zz=$5}} END \{printf "    %s\t  --- \t%9d\t%s\n",yy,xx,zz}' /tmp/ptable >>/tmp/partsize	done	part=`cat /tmp/partsize`		dump_p=`ask_part "$part" "crash dump space" "$dump_d$dump_u" $def_part`	breakdone## the while loop contains the location of var file system#while : truedo	echo "*** ALLOCATE THE var FILE SYSTEM ***You can allocate the var file system to one of the disks listed in thetable below. See the Guide to Installing ULTRIX for an explanation ofthis table: "	ROUTINE="var FILE SYSTEM ALLOCATION"	export ROUTINE	VAR=`finder -f`	set xx $VAR	var_D=$2; var_d=$3; var_u=$4	while :	do		echo -n "You selected ${var_D}, device number ${var_u}.  Make sure this disk ison line and write-enabled (if applicable to this drive) and thenconfirm your choice.Use ${var_D}, ${var_d}${var_u} for var file system? (y/n) []: "		read ANS		ANS=`echo $ANS`		case $ANS in		Y | y )			PASS=			break			;;		N | n )			continue 2			;;		* )			echo "You must answer 'y' or 'n' to the following question."			continue			;;		esac	done	case $var_d$var_u in	$media_d$media_u )		echo "You attempted to allocate the var area on ${media_d}${media_u}, whichcontains your distribution medium."		continue		;;	$root_d$root_u | $usr_d$usr_u | $swap1_d$swap1_u | \		$swap2_d$swap2_u | $dump_d$dump_u )			;;	* )		(cd /dev; MAKEDEV $var_d$var_u  >/dev/null)		dd if=/dev/r${var_d}${var_u}c of=/tmp/wrdisk count=1 >/dev/null 2>&1 ||		{			echo "The $var_D, $var_d$var_u is not accessible.  Make sure the device ison-line and write enabled."			continue		}		dd if=/tmp/wrdisk of=/dev/r${var_d}${var_u}c count=1 >/dev/null 2>&1 ||		{			echo "The $var_D, $var_d$var_u must be write enabled. "			continue		}		;;	esac	/etc/chpt -q /dev/r${var_d}${var_u}c | sed 1,3d > /tmp/ptable	case $? in	0 )	;;	* )		echo "The chpt command failed. Contact your DIGITAL representative."		continue ;;	esac	availp="a b c d e f g h"	case "$var_d$var_u" in	"$root_d$root_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$root_p'" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp $root_p "	#take out a partition		availp=`delet_part "$avoidp" "$availp"`		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "b" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp b"	#take out b partition		availp=`delet_part "$avoidp" "$availp"`		;;	esac## take out the /usr overlap area	case "$var_d$var_u" in	"$usr_d$usr_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$usr_p'" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp $usr_p"    		availp=`delet_part "$avoidp" "$availp"`		;;	esac	case "$var_d$var_u" in	"$swap1_d$swap1_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$swap1_p'" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp $swap1_p"		availp=`delet_part "$avoidp" "$availp"`		;;	esac	case "$var_d$var_u" in	"$swap2_d$swap2_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$swap2_p'" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp $swap2_p"		availp=`delet_part "$avoidp" "$availp"`		;;	esac	case "$var_d$var_u" in	"$dump_d$dump_u" )		avoidp=`cat /tmp/ptable | awk '{if ( $1 == "'$dump_p'" ) print $5}' | sed s/,/\ /g`		avoidp="$avoidp $dump_p"		availp=`delet_part "$avoidp" "$availp"`		;;	esac## the var can be in the /usr#	case $var_d$var_u in	$usr_d$usr_u )		usr_flg=0		for p in "$availp"		do			case $p in			$usr_p )				usr_flg=1				break ;;			esac		done		case $usr_flg in		0 ) availp="$availp $usr_p" ;;		esac		;;	esac	def_part=x		case $DEF_PT in	1 )		case $var_d$var_u in		$root_d$root_u )			case $root_D in			RA82 | RA90 )				def_part=d	;;			* )					def_part=g	;;			esac			;;		esac		;;	esac	part=`size_part "$availp" 0`	case $part in	"" )		echo "${LL}${ERMSG11}"		continue		;;	esac	>/tmp/partsize	for k in $part	do	 	awk '{if ($1 == "'$k'") {yy=$1; xx=$4/2; zz=$5}} END \{printf "    %s\t  --- \t%9d\t%s\n",yy,xx,zz}' /tmp/ptable >>/tmp/partsize	done	part=`cat /tmp/partsize`		var_p=`ask_part "$part" "var file system" "$var_d$var_u" $def_part`	case $var_d$var_u$var_p in	$usr_d$usr_u$usr_p )		mkdir /usr/var		chmod 755 /usr/var		ln -s /usr/var /var		;;	* )		mkdir /var		chmod 755 /var		(cd /usr; ln -s ../var /usr/var)		echo "Making the new file system for var on /dev/r$var_d$var_u$var_p $var_D ${LL}"		echo "Making the new file system for var on /dev/r$var_d$var_u$var_p $var_D" 2>&1 >> /FILESYS.log		umount /var > /dev/null 2>&1		newfs -n /dev/r$var_d$var_u$var_p $var_D 2>&1 >> /FILESYS.log		case $? in		0 ) ;;		* )			echo "The newfs command failed to construct the var file system on/dev/r$var_d$var_u$var_p $var_D ${ERMSG13}"			continue  			;;		esac		mount /dev/$var_d$var_u$var_p /var		case $? in		0 )	;;		* )			echo "The mount command failed to mount the /var file system on/dev/$var_d$var_u$var_p. ${ERMSG13} "			continue 			;;		esac		;;	esac	breakdone

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -