Код: Выделить всё
MODPATH=/lib/modules/$ver/kernel/
if [ -d $MODPATH ]; thenЧто программа хочет в данном условие, просто я не знаком с шелом, а по невыполнению этого условия у меня вылетает ошибка и не ставится программа
Модератор: /dev/random
Код: Выделить всё
MODPATH=/lib/modules/$ver/kernel/
if [ -d $MODPATH ]; then(Hamstux @ Apr 24 2006, в 16:02) писал(а):Что программа хочет в данном условие, просто я не знаком с шелом
Код: Выделить всё
[root@localhost 1]# ./install.sh --interactive
configure kernel
scripts/kconfig/conf -s arch/i386/Kconfig
#
# using defaults found in .config
#
CHK include/linux/version.h
Can't find compiled modules for kernel 2.6.12-12mdk
Can't find compiled modules for kernel. Please, compile your kernel and run this program again.Код: Выделить всё
for ver in $KERNELVERSION
do
MODPATH=/lib/modules/$ver/kernel/
if [ -d $MODPATH ]; then
/bin/echo "ufsd driver can be compiled for kernel $ver($VERSION.$PATCHLEVEL.$SUBLEVEL)"
make clean >/dev/null 2>&1
if [ "$VERSION" == "2" ]; then
if [ "$PATCHLEVEL" == "4" ]; then
/bin/echo "We can build module only for 2.4.x kernels"
else
if [ "$PATCHLEVEL" == "5" -o "$PATCHLEVEL" == "6" ]; then
/bin/echo "We can build module only for 2.6.x kernels"
else
/bin/echo "We can build module only for 2.4.x and 2.6.x kernels"
fi
fi
else
/bin/echo "We can build module only for 2.4.x and 2.6.x kernels"
Finalize
exit 1
fi
make >/dev/null 2>&1
exitCode=$?
case $exitCode in
0)
maked=yes
;;
*)
/bin/echo "Ufsd module was't made"
cd ../
Finalize
exit 1
esac
CURRKERNEL=`uname -r`
if [ "$CURRKERNEL" != "$ver" ]; then
/bin/echo "Ufsd module was build and will be installed for kernel $ver but current kernel in $CURRKERNEL."
if [[ "$AUTO" = "no" ]]; then
/bin/echo "Do you want to install module and service?"
read answer
case "$answer" in
y|Y|yes|Yes|YES)
/bin/echo "Ok. Trying to install."
;;
*)
/bin/echo "Program terminated."
cd ../
Finalize
exit 1
;;
esac
fi
fi
INSTPATH=/lib/modules/$ver/kernel/fs/ufsd
[ -f "$INSTPATH/ufsd.o" ] && /bin/rm -f "$INSTPATH/ufsd.o"
[ -f "$INSTPATH/ufsd.ko" ] && /bin/rm -f "$INSTPATH/ufsd.ko"
if [ ! -d $INSTPATH ]; then
/bin/echo Creating the directory for module
/bin/mkdir -p $INSTPATH
fi
/bin/echo "Moving module in destination directory..."
if [ "$PATCHLEVEL" == "4" ]; then
[ $TESTONLY = "no" ] && /bin/cp -v ./objfre/ufsd.o $INSTPATH
else
if [ "$PATCHLEVEL" == "5" -o "$PATCHLEVEL" == "6" ]; then
if [ -f ./objfre/ufsd.ko ]; then
[ $TESTONLY = "no" ] && /bin/cp -v ./objfre/ufsd.ko $INSTPATH
else
[ $TESTONLY = "no" ] && /bin/cp -v ./objfre/ufsd.o $INSTPATH/ufsd.ko
fi
fi
fi
else
/bin/echo "Can't find compiled modules for kernel $ver"
#1-ое сообщение об ошибке
fi
doneКод: Выделить всё
Finalize
cd ../
if [[ "$maked" = "no" ]]; then
/bin/echo "Can't find compiled modules for kernel. Please, compile your kernel and run this program again."
exit 1
fiCan't find compiled modules for kernel 2.6.12-12mdk
Can't find compiled modules for kernel. Please, compile your kernel and run this program again.
Код: Выделить всё
[root@localhost hamstux]# ls -l /lib/modules/`uname -r`/kernel
итого 32
drwxr-xr-x 36 root root 4096 Апр 20 19:37 3rdparty/
drwxr-xr-x 3 root root 4096 Апр 20 19:37 arch/
drwxr-xr-x 2 root root 4096 Апр 20 19:37 crypto/
drwxr-xr-x 33 root root 4096 Апр 20 19:37 drivers/
drwxr-xr-x 43 root root 4096 Апр 20 19:37 fs/
drwxr-xr-x 4 root root 4096 Апр 20 19:37 lib/
drwxr-xr-x 28 root root 4096 Апр 20 19:37 net/
drwxr-xr-x 11 root root 4096 Апр 20 19:37 sound/Код: Выделить всё
[root@localhost hamstux]# uname -r
2.6.12-12mdk-i686-up-4GBКод: Выделить всё
[root@localhost 1]# ./install.sh --interactive
configure kernel
scripts/kconfig/conf -s arch/i386/Kconfig
#
# using defaults found in .config
#
*
* Restart config...
*
*
* Fusion MPT device support
*
Fusion MPT ScsiHost drivers for SPI (FUSION_SPI) [M/n/?] (NEW) M
Fusion MPT ScsiHost drivers for FC (FUSION_FC) [M/n/?] (NEW) M
Fusion MPT ScsiHost drivers for SAS (FUSION_SAS) [M/n/?] (NEW) M
Maximum number of scatter gather entries (16 - 128) (FUSION_MAX_SGE) [40] 40
CHK include/linux/version.h
Can't find compiled modules for kernel 2.6.12-18mdk
Can't find compiled modules for kernel. Please, compile your kernel and run this program ag ain.