make it actually use the known path to the kernel source, and check for existance before doing anything
ln -fs ../Makefile $${KDIR}/Makefile ; \
ln -fs ../Makefile.common $${KDIR}/Makefile.common; \
<i386_linux22 i386_linux24>
- sh ./redhat.sh ${LINUX_VERS} $${KDIR}/Makefile.extradefs; \
+ sh ./redhat.sh ${LINUX_SRCDIR}$$v $${KDIR}/Makefile.extradefs; \
<all>
done \
done
IBYTES=""
SETATTR=""
-grep i_bytes /lib/modules/$1/build/include/linux/fs.h > /dev/null
+if [ -e $1/include/linux/fs.h ] ; then
+grep i_bytes $1/include/linux/fs.h > /dev/null
if [ $? = 0 ]; then
- IBYTES="-DSTRUCT_INODE_HAS_I_BYTES=1"
+IBYTES="-DSTRUCT_INODE_HAS_I_BYTES=1"
fi
-grep "extern int inode_setattr" /lib/modules/$1/build/include/linux/fs.h > /dev/null
+
+grep "extern int inode_setattr" $1/include/linux/fs.h > /dev/null
if [ $? = 0 ]; then
- SETATTR="-DINODE_SETATTR_NOT_VOID=1"
+SETATTR="-DINODE_SETATTR_NOT_VOID=1"
fi
+if [ -e $2 ] ; then
/bin/rm $2
+fi
echo "KDEFINES = ${IBYTES} ${SETATTR}" > $2
+fi
exit 0