Anaximander Thales
February 12th, 2013, 01:54 AM
I modified a post installation script for nvidia, found here (http://ubuntuforums.org/showthread.php?t=835573), for installing the Ceton InfiniTV drivers. This -- this has become a learning situation for me as it does not work as expected.
Here is the script:
#!/bin/bash
#
# Set this to the exact path of the ceton infinitv driver you plan to use
# It is recommended to use a symlink here so that this script doesn't
# have to be modified when you change driver versions.
DRIVER=/usr/src/ceton_infinitv_linux_driver
# Build new driver if it doesn't exist
if [ -e /lib/modules/$1/extra/ctn91xx.ko ] ; then
echo "CETON infinitv drivers already exists for this kernel." >&2
else
echo "Building CETON infinitv driver for kernel $1" >&2
cd $DRIVER
/usr/bin/make
/usr/bin/make install
/sbin/modprobe ctn91xx
if [ -e /lib/modules/$1/extra/ctn91xx.ko ] ; then
echo " SUCCESS: Driver installed for kernel $1" >&2
else
echo " FAILURE: See log for issues" >&2
fi
fi
exit 0
I hoped that the script would install the ceton drivers when a new kernel was installed. However, what occurs is it attempts to install the drivers on the current kernel.
Building CETON infinitv driver for kernel 3.2.0-38-generic
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-37-generic'
Building modules, stage 2.
MODPOST 1 modules
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-37-generic'
Installing ctn91xx driver...
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-37-generic'
INSTALL /home/user/Downloads/ceton_infinitv_linux_driver/ctn91xx.ko
DEPMOD 3.2.0-37-generic
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-37-generic'
cp 98-ctn91xx.rules /etc/udev/rules.d/
/sbin/depmod -a 3.2.0-37-generic
FAILURE: See log for issues
My question is, how do I make this work as a post installation trigger?
Thanks,
AT
Here is the script:
#!/bin/bash
#
# Set this to the exact path of the ceton infinitv driver you plan to use
# It is recommended to use a symlink here so that this script doesn't
# have to be modified when you change driver versions.
DRIVER=/usr/src/ceton_infinitv_linux_driver
# Build new driver if it doesn't exist
if [ -e /lib/modules/$1/extra/ctn91xx.ko ] ; then
echo "CETON infinitv drivers already exists for this kernel." >&2
else
echo "Building CETON infinitv driver for kernel $1" >&2
cd $DRIVER
/usr/bin/make
/usr/bin/make install
/sbin/modprobe ctn91xx
if [ -e /lib/modules/$1/extra/ctn91xx.ko ] ; then
echo " SUCCESS: Driver installed for kernel $1" >&2
else
echo " FAILURE: See log for issues" >&2
fi
fi
exit 0
I hoped that the script would install the ceton drivers when a new kernel was installed. However, what occurs is it attempts to install the drivers on the current kernel.
Building CETON infinitv driver for kernel 3.2.0-38-generic
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-37-generic'
Building modules, stage 2.
MODPOST 1 modules
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-37-generic'
Installing ctn91xx driver...
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-37-generic'
INSTALL /home/user/Downloads/ceton_infinitv_linux_driver/ctn91xx.ko
DEPMOD 3.2.0-37-generic
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-37-generic'
cp 98-ctn91xx.rules /etc/udev/rules.d/
/sbin/depmod -a 3.2.0-37-generic
FAILURE: See log for issues
My question is, how do I make this work as a post installation trigger?
Thanks,
AT