summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/tcos-generation-functions.sh23
-rw-r--r--conf/tcos-run-functions.sh11
-rw-r--r--conf/version.conf1
3 files changed, 29 insertions, 6 deletions
diff --git a/conf/tcos-generation-functions.sh b/conf/tcos-generation-functions.sh
index 7b6e7a5..a719008 100644
--- a/conf/tcos-generation-functions.sh
+++ b/conf/tcos-generation-functions.sh
@@ -158,13 +158,13 @@ cpifexists () {
if [ -f $DESTDIR/$orig ]; then
return 1
fi
-
-
+
+
if [ $# != 2 ]; then
echo " cpifexists(): ERROR: Need 2 arguments: \$1=$orig \$2=$dest"
return 1
fi
-
+
if [ ! -f $orig ]; then
echo " cpifexits() WARNING: $orig not found, searching with pathof()..."
_file=$(pathof $(basename $orig) )
@@ -177,10 +177,10 @@ cpifexists () {
else
echo " cpifexists(): ERROR: $(basename $orig) no found in PATH, please package that contain $orig"
return 1
- fi
+ fi
fi
-
+
if [ ! -d $DESTDIR/$dest ]; then
echo " cpifexits() WARNING: $DESTDIR/$dest don't exists"
fi
@@ -201,7 +201,7 @@ copydir () {
#_echo " DEBUG: \$1=$1 \$2=$2"
return 1
fi
-
+
#_echo "cp -ra \"${1}\" \"${DESTDIR}/${2}\""
cp -ra "${1}" "${DESTDIR}/${2}"
return 0
@@ -247,6 +247,17 @@ force_add_module() {
# end of force copy
}
+tcos_find_module() {
+ mod=$(find /lib/modules/${TCOS_KERNEL} -name ${1}.ko | tail -1)
+ if [ "$mod" = "" ] ; then
+ return 1
+ fi
+ if [ "$(basename $mod .ko)" = "$1" ]; then
+ return 0
+ fi
+ return 1
+}
+
parse_pxelinuxcfg() {
if [ $TCOS_NETBOOT_MENU ] && [ -z $2 ]; then
TEMPLATE=${TCOS_CONF}/${TCOS_PXECFG_MENU}
diff --git a/conf/tcos-run-functions.sh b/conf/tcos-run-functions.sh
index 7bcd8a7..4e79180 100644
--- a/conf/tcos-run-functions.sh
+++ b/conf/tcos-run-functions.sh
@@ -103,6 +103,17 @@ _log () {
/bin/logger -t "$(echo $1| awk '{print $1}')" "$@" >> /tmp/initramfs.debug 2>&1
}
+tcos_find_module() {
+ mod=$(find /lib/modules/${version} -name ${1}.ko | tail -1)
+ if [ "$mod" = "" ] ; then
+ return 1
+ fi
+ if [ "$(basename $mod .ko)" = "$1" ]; then
+ return 0
+ fi
+ return 1
+}
+
read_server() {
# $1 is server hostname
nSERVER=$(grep "$1" /etc/hosts | awk '{print $1}' | head -1)
diff --git a/conf/version.conf b/conf/version.conf
index ba40955..50f020f 100644
--- a/conf/version.conf
+++ b/conf/version.conf
@@ -3,4 +3,5 @@
TCOS_VERSION="__TCOS_VERSION__"
TCOS_DISTRO="__TCOS_DISTRO__"
TCOS_ARCH="__TCOS_ARCH__"
+TCOS_MULTIARCH="__TCOS_MULTIARCH__"
DISTRIBUTION="__DISTRIBUTION__"