SOURCES (DEVEL): mol-scripts.patch (NEW) - script improvements, no...

sparky sparky at pld-linux.org
Thu Nov 16 21:53:34 CET 2006


Author: sparky                       Date: Thu Nov 16 20:53:34 2006 GMT
Module: SOURCES                       Tag: DEVEL
---- Log message:
- script improvements, no networking by default

---- Files affected:
SOURCES:
   mol-scripts.patch (NONE -> 1.1.2.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/mol-scripts.patch
diff -u /dev/null SOURCES/mol-scripts.patch:1.1.2.1
--- /dev/null	Thu Nov 16 21:53:34 2006
+++ SOURCES/mol-scripts.patch	Thu Nov 16 21:53:28 2006
@@ -0,0 +1,126 @@
+diff -Nur mol-0.9.71.1.orig/Doc/config/molrc.net mol-0.9.71.1.scripts/Doc/config/molrc.net
+--- mol-0.9.71.1.orig/Doc/config/molrc.net	2006-10-28 18:59:02.000000000 +0000
++++ mol-0.9.71.1.scripts/Doc/config/molrc.net	2006-11-16 20:51:45.000000000 +0000
+@@ -21,7 +21,7 @@
+ #
+ 
+ ifeq ${boot_type} newworld oldworld {	# Configure for MacOS only
+-	netdev:	eth0 -sheep
++#	netdev:	eth0 -sheep
+ }
+ 
+ #------------------------------------------------------------------------------
+@@ -45,7 +45,7 @@
+ #
+ #	tunconfig:     alternate_tunconfig_script
+ 
+-netdev:		tun${session} -tun
++#netdev:		tun${session} -tun
+ 
+ 
+ #------------------------------------------------------------------------------
+diff -Nur mol-0.9.71.1.orig/Doc/config/tunconfig mol-0.9.71.1.scripts/Doc/config/tunconfig
+--- mol-0.9.71.1.orig/Doc/config/tunconfig	2006-10-28 18:59:02.000000000 +0000
++++ mol-0.9.71.1.scripts/Doc/config/tunconfig	2006-11-16 20:51:45.000000000 +0000
+@@ -22,7 +22,7 @@
+ 
+ #NAMESERVER=10.0.0.1
+ 
+-IPTABLES=/sbin/iptables
++IPTABLES=/usr/sbin/iptables
+ DHCPD=/usr/sbin/dhcpd
+ 
+ ####################################################################
+diff -Nur mol-0.9.71.1.orig/scripts/kernelsrc mol-0.9.71.1.scripts/scripts/kernelsrc
+--- mol-0.9.71.1.orig/scripts/kernelsrc	2006-10-28 18:59:02.000000000 +0000
++++ mol-0.9.71.1.scripts/scripts/kernelsrc	2006-11-16 20:51:45.000000000 +0000
+@@ -6,7 +6,7 @@
+ 
+ function headercheck()
+ {
+-    KERNEL_SOURCE="/lib/modules/`uname -r`/build"
++    test -d $KERNEL_SOURCE || KERNEL_SOURCE="/lib/modules/`uname -r`/build"
+     test -d $KERNEL_SOURCE || KERNEL_SOURCE=/usr/src/linux
+ 
+     if ! test -d $KERNEL_SOURCE ; then
+diff -Nur mol-0.9.71.1.orig/scripts/modload mol-0.9.71.1.scripts/scripts/modload
+--- mol-0.9.71.1.orig/scripts/modload	2006-10-28 18:59:02.000000000 +0000
++++ mol-0.9.71.1.scripts/scripts/modload	2006-11-16 20:51:45.000000000 +0000
+@@ -101,15 +101,12 @@
+ ###################################################
+ 
+ function load_mol_module () {
+-    MOL_MOD=`get_mod_name mol` || exit $?
++    echo "Loading Mac-on-Linux kernel module:"
+ 
+-    echo -e "Loading Mac-on-Linux kernel module:\n   $MOL_MOD"
+-
+-    /sbin/insmod -f $MOL_MOD || {
++    /sbin/modprobe -v mol || {
+ 	echo "===================================================================="
+-	echo "  Failed to load the module - try recompiling the MOL kernel"
+-	echo "  module. Instructions (and information about common problems)"
+-	echo "  are available at <http://www.maconlinux.org>."
++	echo "  Failed to load the Mac-on-Linux kernel module -- please install   "
++	echo "  kernel-misc-mol for your kernel.                                  "
+ 	echo "===================================================================="
+ 	echo 
+ 	exit 1
+@@ -123,10 +120,9 @@
+ ###################################################
+ 
+ function load_mod () {
+-    MOD=`get_mod_name $1` || return $?
+-    echo -e "Loading" $2 "kernel module:\n   $MOD"
++    echo "Loading $2 kernel module:"
+ 
+-    /sbin/insmod -f $MOD
++    /sbin/modprobe -v $1
+ }
+ 
+ 
+@@ -135,7 +131,7 @@
+ ###################################################
+ 
+ function sheep_check () {
+-    [ ! -c /dev/sheep_net ] && {
++    [ ! -c /dev/sheep_net -a ! -e /dev/.devfsd -a ! -e /dev/.udev.tdb ] && {
+ 	echo "Creating the /dev/sheep_net device node."
+ 	mknod --mode=600 /dev/sheep_net c 10 198
+     }
+@@ -143,7 +139,7 @@
+ }
+ 
+ function tun_check () {
+-    [ ! -c /dev/net/tun ] && {
++    [ ! -c /dev/net/tun -a ! -e /dev/.devfsd -a ! -e /dev/.udev.tdb ] && {
+ 	echo "Creating the /dev/net/tun device node."
+ 	[ -d /dev/net ] || mkdir --mode 755 /dev/net
+ 	mknod --mode=600 /dev/net/tun c 10 200
+@@ -157,8 +153,10 @@
+ 	echo "Failed to extract the MOL device number"
+ 	exit 1
+     }
+-    rm -f /dev/mol
+-    mknod --mode=600 /dev/mol c 10 "$MINOR"
++    [ ! -c /dev/mol ] && {
++	rm -f /dev/mol
++	mknod --mode=600 /dev/mol c 10 "$MINOR"
++    }
+ }
+ 
+ 
+diff -Nur mol-0.9.71.1.orig/scripts/mol_uname mol-0.9.71.1.scripts/scripts/mol_uname
+--- mol-0.9.71.1.orig/scripts/mol_uname	2006-10-28 18:59:02.000000000 +0000
++++ mol-0.9.71.1.scripts/scripts/mol_uname	2006-11-16 20:51:45.000000000 +0000
+@@ -100,6 +100,10 @@
+     for x in $MOD_PATHS ; do
+ 	[ -f $x/$THIS_UNAME/mol.o -o -f $x/$THIS_UNAME/mol.ko ] && { 
+ 	    echo $x/$THIS_UNAME
++           exit 0
++       }
++       [ -f $x/$THIS_UNAME/misc/mol.o ] && { 
++           echo $x/$THIS_UNAME/misc
+ 	    exit 0
+ 	}
+     done
================================================================


More information about the pld-cvs-commit mailing list