# hooks addon discover support # no discover1 support avalaible yet # works good with discover if [ ! $TCOS_____DISABLED___DISCOVER ] ;then _verbose "(08discover) TCOS_DISCOVER disabled" else # check if discover is discover or discover1 if [ -d ${TCOS_PKG_CACHE}/discover ] && [ -d ${TCOS_PKG_CACHE}/discover-data ] && [ -d ${TCOS_PKG_CACHE}/libdiscover2 ] ; then stat_before disco_path=${TCOS_PKG_CACHE}/discover disco_lib=${TCOS_PKG_CACHE}/libdiscover2 disco_data=${TCOS_PKG_CACHE}/discover-data # Discover cpifexists $disco_path/sbin/discover /usr/bin/ cpifexists $disco_path/usr/bin/discover-config /usr/bin cpifexists $disco_path/sbin/discover-modprobe /usr/bin cpifexists $disco_path/etc/discover-modprobe.conf /etc/ #copydir $disco_path/lib/discover /lib/ # discover files have 2 Mb here put into squashfs and make a link in 05inittcos copydir $disco_data/lib/discover /usr/lib/ cpifexists $disco_lib/usr/lib/libdiscover.so.2 /usr/lib/ mkdir -p $DESTDIR/usr/share/discover/dtd/ copydir $disco_lib/usr/share/discover/dtd/ /usr/share/discover/ copydir $disco_lib/etc/discover.conf.d/ /etc/ mkdir -p $DESTDIR/etc/default cp /etc/default/rcS ${DESTDIR}/etc/default/ stat_after "Discover [cached]" elif [ -d /usr/share/doc/discover1 ]; then echo "WARNING:" echo "" echo "discover1 detected, USE discover or cache discover package" echo " discover1 is not supported" echo " => gentcos -instpkg discover libdiscover2 discover-data" echo " => apt-get install discover" echo "" else stat_before # Discover cpifexists /sbin/discover /usr/bin/ cpifexists /usr/bin/discover-config /usr/bin cpifexists /sbin/discover-modprobe /usr/bin cpifexists /etc/discover-modprobe.conf /etc/ # discover files have 2 Mb here put into squashfs and make a link in 05inittcos copydir /lib/discover /usr/lib/ cpifexists /usr/lib/libdiscover.so.2 /usr/lib/ mkdir -p $DESTDIR/usr/share/discover/dtd/ copydir /usr/share/discover/dtd/ /usr/share/discover/ copydir /etc/discover.conf.d/ /etc/ mkdir -p $DESTDIR/etc/default cp /etc/default/rcS ${DESTDIR}/etc/default/ stat_after "Discover" fi # end of tcos_discover fi fi # end of TCOS_DISCOVER