# this file copies tcosxmlrpc server into initramfs # and adds startup scripts of tcosxmlrpc server if [ $TCOS_MONITOR ]; then stat_before # EJECT for mount/umount cdrom copy_exec /usr/bin/eject /usr/bin/ # SCROT package copy_exec /usr/bin/scrot /usr/bin/ mkdir -p $DESTDIR/usr/lib/imlib2/filters/ mkdir -p $DESTDIR/usr/lib/imlib2/loaders/ cpifexists /usr/lib/imlib2/loaders/png.so /usr/lib/imlib2/loaders/ cpifexists /usr/lib/imlib2/loaders/jpeg.so /usr/lib/imlib2/loaders/ #cpifexists /usr/lib/imlib2/loaders/gif.so /usr/lib/imlib2/loaders/ # screenshot script and webserver cpifexists ${TCOS_BINS}/screenshot.sh /sbin/ cpifexists ${TCOS_BINS}/useallmodules.sh /sbin/ cpifexists ${TCOS_BINS}/devicesctl.sh /sbin/ cpifexists ${TCOS_BINS}/vnc-controller.sh /sbin/ cpifexists ${TCOS_BINS}/vlc-controller.sh /sbin/ cpifexists ${TCOS_BINS}/rtp-controller.sh /sbin/ cpifexists ${TCOS_BINS}/pactl-controller.sh /sbin/ cpifexists /usr/bin/vncviewer /usr/bin/ cpifexists ${TCOS_BINS}/soundctl.sh /sbin/ cpifexists ${TCOS_BINS}/configctl.sh /sbin/ # udev process cpifexists ${TCOS_BINS}/tcos-udevd.sh /sbin/ mkdir -p ${DESTDIR}/etc/udev/rules.d/ cpifexists /usr/share/initramfs-tools-tcos/xmlrpc/050_tcos_devices.rules /etc/udev/rules.d/ # with new kernels (>= 2.6.22) need mount/umount events cpifexists ${TCOS_BINS}/mount-listener /usr/sbin/ cpifexists ${TCOS_BINS}/save-udev.sh /usr/sbin/ cpifexists ${TCOS_BINS}/listener-daemon.sh /usr/sbin/ # need udevinfo in listener-daemon.sh if [ ! -e /usr/bin/udevinfo ] || readlink /usr/bin/udevinfo | grep -q udevadm; then cat << EOF > $DESTDIR/usr/bin/udevinfo #!/bin/sh /sbin/udevadm info \$@ EOF chmod +x $DESTDIR/usr/bin/udevinfo else cpifexists /usr/bin/udevinfo /usr/bin/ fi # tcosxmlrpc utils cpifexists ${TCOS_BINS}/tcosxmlrpc /usr/bin/ cpifexists ${TCOS_BINS}/lockscreen /usr/bin/ cpifexists ${TCOS_BINS}/screensize /usr/bin/ cpifexists ${TCOS_BINS}/lockvlc /usr/bin/ cpifexists ${TCOS_BINS}/lockvnc /usr/bin/ cpifexists ${TCOS_BINS}/get_server /usr/bin/ # copy locked image mkdir -p ${DESTDIR}/usr/share/tcos-core/ if [ -e /usr/share/tcos-core/lockscreen-custom.png ];then cp /usr/share/tcos-core/lockscreen-custom.png ${DESTDIR}/usr/share/tcos-core/ else cp /usr/share/tcos-core/lockscreen.png ${DESTDIR}/usr/share/tcos-core/ fi cpifexists ${TCOS_BINS}/getinfo.sh /sbin/ chmod +x $DESTDIR/sbin/getinfo.sh cat << EOF > $DESTDIR/sbin/restartx #!/bin/sh restartxorg & exit 0 EOF chmod +x $DESTDIR/sbin/restartx # pci database copy_exec /usr/bin/lspci /usr/bin/ mkdir -p $DESTDIR/usr/share/misc/ [ -f /usr/share/misc/pci.ids ] && cpifexists /usr/share/misc/pci.ids /usr/share/misc/ [ -f /usr/share/misc/pci.ids.gz ] && cpifexists /usr/share/misc/pci.ids.gz /usr/share/misc/ cpifexists /usr/share/initramfs-tools-tcos/xmlrpc/abyss.conf /etc/ cpifexists /usr/share/initramfs-tools-tcos/xmlrpc/mime.types /etc/ # configure /etc/abyss.conf # abs path of mime.types sed -i s/"etc"/"\/etc"/g ${DESTDIR}/etc/abyss.conf # configure user sed -i s/"nobody"/"root"/g ${DESTDIR}/etc/abyss.conf mkdir -p $DESTDIR/var/log mkdir -p $DESTDIR/var/www # add launcher cat << EOF > $DESTDIR/sbin/startxmlrpc #!/bin/sh killall tcosxmlrpc >/dev/null 2>&1 cd / /usr/bin/tcosxmlrpc /etc/abyss.conf >> /var/log/tcosxmlrpc.log 2>&1 exit 0 EOF chmod +x $DESTDIR/sbin/startxmlrpc stat_after "TcosMonitor" else _verbose "(25tcosmonitor) TCOS_TCOSMONITOR Disabled" fi