codekasten/knoppix-remastering/local.conf.d/chroot_scripts.d/comedi_install.sh

37 lines
872 B
Bash
Executable file

KVERSION=$(readlink /boot/vmlinuz)
KVERSION=${KVERSION#vmlinuz-}
if [ -e /usr/local/lib/libcomedi.so ]
then echo " comedi is already installed"
else old_pwd=$(pwd)
cd /opt
tar xzf src/comedi-*.tar.gz
tar xzf src/comedilib-*.tar.gz
# install comedi
# install comedilib
# refresh module dependencies
cd /opt/comedi-*
./configure --with-linuxdir=/usr/src/linux --with-kernel-release=${KVERSION} --disable-pcmcia && \
make && \
make install && \
cd /opt/comedilib-* && \
./configure && \
make && \
make install && \
cd "$old_pwd"
fi
# update module dependencies
KVERSION=$(readlink /boot/vmlinuz)
KVERSION=${KVERSION#vmlinuz-}
depmod -a "$KVERSION"
# update init-links for module loading
update-rc.d comedi defaults
# update library dependencies
ldconfig
# if something fails, then the marker file /usr/local/lib/libcomedi.so is not created