# hooks addon SOUND support # need esound cat << EOF > $DESTDIR/sbin/startesd #!/bin/sh exit 0 EOF #cat << EOF > $DESTDIR/sbin/startesd ##!/bin/sh #echo "STARTESD starting esound daemon" >> /tmp/initramfs.debug #esd -public -tcp -nobeeps -as 1 -trust -promiscuous & >> /tmp/initramfs.debug 2>&1 #EOF chmod +x $DESTDIR/sbin/startesd function copy_esd_libs() { # esound libs cpifexists /lib/libc.so.6 /lib/ cpifexists /lib/libpthread.so.0 /lib/ cpifexists /lib/libnsl.so.1 /lib/ cpifexists /lib/libnss_nis.so.2 /lib/ cpifexists /lib/libnss_files.so.2 /lib/ cpifexists /lib/libnss_compat.so.2 /lib/ cpifexists /lib/libm.so.6 /lib/ cpifexists /lib/libdl.so.2 /lib/ } function copy_libesd0() { if [ -d ${TCOS_PKG_CACHE}/libesd0 ]; then rm -f $DESTDIR/usr/lib/libesd.so* copy_exec ${TCOS_PKG_CACHE}/libesd0/usr/lib/libesd.so.0.* /usr/lib/libesd.so.0 _echo " * libesd0 enabled OSS compatibility layer." else _echo "" _echo " Warning: libesd0 not found in packages cache dir." _echo " # gentcos -instpkg libesd0" _echo "" fi } if [ $TCOS__NOT_NEEDED_ANYMORE_ESD__SOUND ]; then if [ ! -e /usr/bin/esd ]; then _echo " Warning: eSound not installed." exit 0 elif [ "$(_ldd /usr/bin/esd 2>/dev/null | grep -c dynamic)" = "1" ]; then stat_before mkdir -p $DESTDIR/etc/esound # pulseaudio installed if [ -d ${TCOS_PKG_CACHE}/esound ]; then copy_exec ${TCOS_PKG_CACHE}/esound/usr/bin/esd /usr/bin/ rm $DESTDIR/usr/bin/esd cp ${TCOS_PKG_CACHE}/esound/usr/bin/esd $DESTDIR/usr/bin/esd else _echo "" _echo " Warning: PulseAudio overwrite /usr/bin/esd" _echo " and cache package not found." _echo " # gentcos -instpkg esound libesd0" _echo "" fi copy_libesd0 copy_esd_libs stat_after "ESound Daemon (sound server [cached])" else stat_before cpifexists /usr/bin/esd /usr/bin/ mkdir -p $DESTDIR/etc/esound copy_libesd0 copy_esd_libs stat_after "ESound Daemon (sound server)" fi # end of sound_error else _verbose "(22esd) TCOS_SOUND disabled" fi # end of TCOS_SOUND