summaryrefslogtreecommitdiff
path: root/conf/tcos-generation-functions.sh
diff options
context:
space:
mode:
authorDimitri John Ledkov <dimitri.ledkov@canonical.com>2013-12-31 13:28:27 +0000
committerDimitri John Ledkov <dimitri.ledkov@canonical.com>2013-12-31 13:28:27 +0000
commit9b4f2dd391d79f67fbff8627d7217f003105dfab (patch)
tree82a07d69e72baa942283bc332b5d4456a52fbc1a /conf/tcos-generation-functions.sh
parent85e11fb132b2b81b50a45647b070e8f6fd648d65 (diff)
parentde57566ca38d821454f8df4dfe36f4820c8fbaa4 (diff)
Merge tag 'tcos-0.89.93' into dgit/sidHEADdebian/0.89.93master
0.89.93
Diffstat (limited to 'conf/tcos-generation-functions.sh')
-rw-r--r--conf/tcos-generation-functions.sh23
1 files changed, 17 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}