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

📄 uml-functions.sh

📁 ipsec vpn
💻 SH
📖 第 1 页 / 共 2 页
字号:
    # or, you might want to force it to local    # cp /etc/localtime $hostroot/etc/localtime    # copy configuration files    ### XXX this should be done with a generated Makefile.    (cd ${TESTINGROOT}/baseconfigs/$host && tar cf - .) | (cd $hostroot && tar -x -f - --unlink-first)    # setup the mount of /usr/share    echo "none	   /usr/share		     hostfs   defaults,ro,$SHAREROOT 0 0" >>$hostroot/etc/fstab    # split Debian "interfaces" file into RH ifcfg-* file    mkdir -p $hostroot/etc/sysconfig/network-scripts    ${TESTINGROOT}/utils/interfaces2ifcfg.pl $hostroot/etc/network/interfaces $hostroot/etc/sysconfig/network-scripts    # hard link the kernel to save space.    if [ ! -f $POOLSPACE/$host/linux ]    then	rm -f $POOLSPACE/$host/linux	ln $KERNEL $POOLSPACE/$host/linux    fi    # make startup script    startscript=$POOLSPACE/$host/start.sh    if [ ! -f $startscript ]    then	echo '#!/bin/sh' >$startscript	echo ''          >>$startscript	echo '# get $net value from baseconfig'          >>$startscript	echo ". ${TESTINGROOT}/baseconfigs/net.$host.sh" >>$startscript	echo ''          >>$startscript	echo "$POOLSPACE/$host/linux ubd0=$hostroot umid=$host \$net \$UML_DEBUG_OPT \$UML_$host_OPT \$*" >>$startscript	chmod +x $startscript    fi}applypatches() {    if [ ! -d arch/um/.PATCHAPPLIED ]     then	echo Applying $UMLPATCH	if [ "$UMLPATCH" != "none" ] && [ "$UMLPATCH" != /dev/null ]	then	    if bzcat $UMLPATCH | patch -p1 	    then		:	    else		echo "Failed to apply UML patch: $UMLPATCH"		exit 1;	    fi        fi	if [ -n "$UMLPATCH2" ] && [ -f $UMLPATCH2 ]	then		echo Applying $UMLPATCH2		if bzcat $UMLPATCH2 | patch -p1 		then		    :		else		    echo "Failed to apply UML patch: $UMLPATCH2"		    exit 1;		fi	fi	if [ -n "$NONINTPATCH" ] && [ "$NONINTPATCH" != "none" ]	then	    if [ -f "$NONINTPATCH" ]	    then		echo Applying non-interactive config patch		cat $NONINTPATCH | patch -p1		NONINTCONFIG=oldconfig_nonint	    else		echo Can not find +$NONINTPATCH+		exit 1	    fi	fi	if [ -n "$EXTRAPATCH" ]	then	    echo Applying other version specific stuff	    cat $EXTRAPATCH | patch -p1	fi	for patch in ${TESTINGROOT}/kernelconfigs/local_${KERNEL_MAJ_VERSION}_*.patch	do	    if [ -f $patch ] 	    then		echo Applying local patch $patch		cat $patch | patch -p1	    fi	done	mkdir -p arch/um/.PATCHAPPLIED	if $NATTPATCH	then	    echo Applying the NAT-Traversal patch	    (cd $OPENSWANSRCDIR && make nattpatch${KERNVERSION} ) | patch -p1	else            echo Not applying the NAT-Traversal patch	fi    fi}## $Log: uml-functions.sh,v $# Revision 1.38  2005/07/14 01:35:54  mcr# 	use USE_OBJDIR.## Revision 1.37  2005/05/11 02:17:52  mcr# 	add option to sleep at end of UML run.## Revision 1.36  2005/04/15 02:16:53  mcr# 	re-factored kernel directory creation/patching to routine.## Revision 1.35  2004/10/17 17:38:35  mcr# 	add /usr/local and /var/tmp mounts to /etc/fstab so that# 	they can be umount'ed/mount'ed to flush changes.## Revision 1.34  2004/09/13 02:27:42  mcr# 	install klips26 module as ipsec.o, not ipsec.ko.## Revision 1.33  2004/09/06 18:39:45  mcr# 	copy/rename the .ko file to ipsec.o.## Revision 1.32  2004/09/06 04:49:42  mcr# 	make sure to copy the right module into the UML root.## Revision 1.31  2004/08/18 02:11:08  mcr# 	kernel 2.6 changes.## Revision 1.30  2004/04/03 19:44:52  ken# FREESWANSRCDIR -> OPENSWANSRCDIR (patch by folken)## Revision 1.29  2003/10/31 02:43:34  mcr# 	pull up of port-selector tests## Revision 1.28.2.1  2003/10/29 02:11:00  mcr# 	make sure that local module makefile gets version info included.## Revision 1.28  2003/09/02 19:45:48  mcr# 	use rootfs= directive instead of ubd0= directive for# 	setting hostfs root file system.## Revision 1.27  2003/07/30 16:46:57  mcr# 	created /var/log/pluto/peer directory in UMLs.## Revision 1.26  2003/06/22 21:53:53  mcr# 	generated makefile list had $hostroot missing, put it in with# 	a more obvious way.## Revision 1.25  2003/06/22 21:41:05  mcr# 	while the file targets themselves were sanitized, the list of# 	targets was not sanitized by the same process, and so got out# 	of sync - it left in CVS backups. Now use the same process.# 	Problem discovered by DHR in week of 2003/06/17.## Revision 1.24  2002/11/11 17:07:18  mcr# 	ignore CVS backup files.## Revision 1.23  2002/10/30 05:00:35  rgb# Added missing escape to catch litteral "." followed by "/" rather than# "any char" followed by "/".## Revision 1.22  2002/10/26 15:10:39  mcr# 	make sure that all files are in the dependancy list.## Revision 1.21  2002/10/22 01:13:49  mcr# 	UML root file system will copy files from "all" config# 	and then files from specific hosts.## Revision 1.20  2002/10/17 02:39:53  mcr# 	make sure to set SUBARCH for module builds.## Revision 1.19  2002/10/02 02:18:29  mcr# 	con=pts was not a good idea - it isn't harmless for 2.4.18.## Revision 1.18  2002/09/30 16:04:29  mcr# 	include "con=pts" for 2.4.19 UMLs.## Revision 1.17  2002/09/16 18:23:58  mcr# 	make the installed UML copy of FreeSWAN depend upon# 	Makefile.ver as well.## Revision 1.16  2002/08/29 23:47:09  mcr# 	when generating UMLPOOL/Makefile, make sure that the generated# 	ipsec.o depends upon the KLIPS source code## Revision 1.15  2002/08/08 01:53:36  mcr# 	when building the UML environment, make the $OPENSWANSRCDIR# 	available as /usr/src, and the $OPENSWANSRCDIR/testing as /testing.## Revision 1.14  2002/08/05 00:17:45  mcr# 	do not install FreeSWAN for "regular hosts"## Revision 1.13  2002/08/02 22:33:06  mcr# 	create startmodule.sh that uses UMLPOOL/plain.# 	copy ipsec.o module from UMLPOOL/module.# 	build UMLPOOL/module/ipsec.o in common section.## Revision 1.12  2002/07/29 15:47:21  mcr# 	copying of BASICROOT often results in an error, which can be# 	ignored.# 	ignore CVS directories more carefully.## Revision 1.11  2002/07/29 05:58:58  mcr# 	generated UMLPOOL/Makefile now installs FreeSWAN as well.## Revision 1.10  2002/07/29 05:52:31  mcr# 	more adjusting of quoting - lost $* on end of command line.# 	this is needed so that klipstest can invoke "east single"## Revision 1.9  2002/07/29 05:46:42  mcr# 	quiet the make output with @ on every line.# 	the depends list does not get updated in a subshell, so# 	reprocess it again.# 	adjust quoting for start.sh script...## Revision 1.8  2002/07/29 02:46:58  mcr# 	make sure that the directories are made before they are used.# 	remove ./ from file names so that dependancies find the right file.## Revision 1.7  2002/07/29 01:02:20  mcr# 	instead of actually doing all the operations, build# 	a makefile in $POOLSPACE that will do it whenever necessary.## Revision 1.6  2002/07/15 09:58:14  mcr# 	removed ubd1 from /etc/fstab, and command line.# 	add /usr/share mount to /etc/fstab post-copy.## Revision 1.5  2002/04/04 00:19:02  mcr# 	when setting up root file systems, see if we built an ipsec.o# 	as part of the kernel build, and if so, copy it to /ipsec.o for# 	later use.## Revision 1.4  2002/01/12 02:50:29  mcr# 	when removing /var to make private copy, make sure that# 	-f(orce) is set.## Revision 1.3  2001/11/23 00:38:41  mcr# 	make /var private# 	make fake fsck.hostfs# 	split Debian interfaces file into RH file using script.## Revision 1.2  2001/11/07 20:10:20  mcr# 	revised setup comments after RGB consultation.# 	removed all non-variables from umlsetup-sample.sh.## Revision 1.1  2001/11/07 19:25:17  mcr# 	split out some functions from make-uml.##

⌨️ 快捷键说明

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