1#! /bin/sh 2# 3# tab tseng ,mount tmp on some target dir for test run 4# 5PATH=/bin:/sbin:/usr/bin:/usr/sbin:~/bin 6export PATH 7 8echo creating dir on /tmp 9#mkdir /tmp/usr_var_ 10#mkdir /tmp/etc_ 11#mkdir /tmp/usr_etc 12#mkdir /tmp/var_cache 13 14test -z "/tmp/avahi" || mkdir "/tmp/avahi" 15cp -f /usr/etc/avahi-daemon.conf /tmp/avahi/avahi-daemon.conf 16cp -f /etc/system.conf /tmp/system.conf 17test -z "/tmp/system.d" || mkdir "/tmp/system.d" 18cp -f /etc/avahi-dbus.conf /tmp/system.d/avahi-dbus.conf 19 20 21echo done.... 22#adduser messagebus 23#addgroup netdev 24#sed -i '1i root:*:0:0:root:/:/bin/sh' /etc/passwd 25 26echo starting dbus... 27dbus-daemon --config-file=/tmp/system.conf 28sleep 3 29 30echo starting avahi... 31avahi-daemon -f /tmp/avahi/avahi-daemon.conf & 32sleep 3 33 34echo starting forked-daapd 35test -z "/tmp/forked-daapd" || mkdir "/tmp/forked-daapd" 36cp -f /etc/forked-daapd.conf /tmp/forked-daapd.conf 37 38echo done! 39