[Lunar-commits] r14896 - in brutus/trunk/nestu: . modutils-wrappers

Jaime Buffery nestu at lunar-linux.org
Sat May 21 10:15:57 UTC 2005


Author: nestu
Date: 2005-05-21 10:15:57 +0000 (Sat, 21 May 2005)
New Revision: 14896

Added:
   brutus/trunk/nestu/modutils-wrappers/
   brutus/trunk/nestu/modutils-wrappers/module-init-tools
   brutus/trunk/nestu/modutils-wrappers/modutils
   brutus/trunk/nestu/modutils-wrappers/shared
Log:
Initial important of the modutils-wrappers code. Need to be worked upon ;)


Added: brutus/trunk/nestu/modutils-wrappers/module-init-tools
===================================================================
--- brutus/trunk/nestu/modutils-wrappers/module-init-tools	2005-05-21 01:16:42 UTC (rev 14895)
+++ brutus/trunk/nestu/modutils-wrappers/module-init-tools	2005-05-21 10:15:57 UTC (rev 14896)
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+# script that has only m-i-t (2.6) version
+
+if uname -r | grep -q "^2.4" ; then
+   echo "ERROR: $0 only works for 2.6.X kernels." >&2 
+   exit 1
+fi
+
+PREFIX=/lib/module-init-tools
+BIN=`basename $0`
+
+for dir in sbin bin
+do
+   placement=${PREFIX}/${dir}/${BIN}
+
+   if [ -e ${placement} ]; then
+      ${placement} "$@" && exit 0;
+      exit 1;
+   fi
+done
+
+cat << EOF >&2
+ERROR: This is a only wrapper script. The ${BIN} binary 
+you requested is not installed. Please 
+
+  lin module-init-tools
+
+now to install ${BIN} for your currently running 2.6 kernel.
+EOF
+
+exit 1;


Property changes on: brutus/trunk/nestu/modutils-wrappers/module-init-tools
___________________________________________________________________
Name: svn:executable
   + *

Added: brutus/trunk/nestu/modutils-wrappers/modutils
===================================================================
--- brutus/trunk/nestu/modutils-wrappers/modutils	2005-05-21 01:16:42 UTC (rev 14895)
+++ brutus/trunk/nestu/modutils-wrappers/modutils	2005-05-21 10:15:57 UTC (rev 14896)
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+# script that has only modutils (2.4) version
+
+if uname -r | grep -q "^2.6" ; then
+   echo "ERROR: $0 only works for 2.4.X kernels." >&2
+   exit 1
+fi
+
+PREFIX=/lib/modutils
+BIN=`basename $0`
+
+for dir in sbin bin
+do
+   placement=${PREFIX}/${dir}/${BIN}
+
+   if [ -e ${placement} ]; then
+      ${placement} "$@" && exit 0;
+      exit 1;
+   fi
+done
+
+cat << EOF >&2
+ERROR: This is a only wrapper script. The ${BIN} binary 
+you requested is not installed. Please 
+
+  lin modutils
+
+now to install ${BIN} for your currently running 2.4 kernel.
+EOF
+
+exit 1;


Property changes on: brutus/trunk/nestu/modutils-wrappers/modutils
___________________________________________________________________
Name: svn:executable
   + *

Added: brutus/trunk/nestu/modutils-wrappers/shared
===================================================================
--- brutus/trunk/nestu/modutils-wrappers/shared	2005-05-21 01:16:42 UTC (rev 14895)
+++ brutus/trunk/nestu/modutils-wrappers/shared	2005-05-21 10:15:57 UTC (rev 14896)
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+export PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+# script that has its modutils and m-i-t version
+
+if uname -r | grep -q "^2.6" ; then
+   KVER=2.6
+   MTYPE=module-init-tools
+else
+   KVER=2.4
+   MTYPE=modutils
+fi
+
+PREFIX=/lib/${MTYPE}
+BIN=`basename $0`
+
+for dir in sbin bin
+do
+   placement=${PREFIX}/${dir}/${BIN}
+   
+   if [ -e ${placement} ]; then
+      ${placement} "$@" && exit 0;
+      exit 1;
+   fi
+done
+
+cat << EOF >&2
+ERROR: This is a only wrapper script. The ${BIN}
+binary you requested is not installed. Please 
+
+  lin ${MTYPE} 
+
+now to install ${BIN} for your currently running ${KVER} kernel.
+EOF
+
+exit 1;


Property changes on: brutus/trunk/nestu/modutils-wrappers/shared
___________________________________________________________________
Name: svn:executable
   + *



More information about the Lunar-commits mailing list