View Single Post
Old 05-08-2011, 09:20 PM   #136
h1uke
Zealot
h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.h1uke can do the Funky Gibbon.
 
Posts: 121
Karma: 82565
Join Date: Aug 2010
Location: Maryland, USA
Device: dxg, k3w,k4nt,kpw
Quote:
Originally Posted by yifanlu View Post
Edit /var/local/system/drivemode_online or do a factory reset.
I doubt that editing makes any sense, just because /var/local/system/drivemode_online
gets rewritten by the content of SYS_GADGET_ONLINE file on every [re]boot.

BTW, EDIT and EDIT2 above suggest different settings for /var/local/system/drivemode.
I tried both with no luck.

Adding a line to /etc/init.d/volumd can be a quick and dirty workaround.
At least, this works for me:

Code:
#!/bin/sh

CONF_NAME=volumd
PMOND_START="lipc-set-prop com.lab126.pmond start "
PMOND_STOP="lipc-set-prop com.lab126.pmond stop"

NAME="Volume daemon"
DAEMON=/usr/sbin/volumd
PIDFILE=/var/run/`basename $DAEMON`.pid
_FUNCTIONS=/etc/rc.d/functions
[ -f ${_FUNCTIONS} ] && . ${_FUNCTIONS}

if [ -r /etc/sysconfig/mntus ]; then
        source /etc/sysconfig/mntus
        DAEMON_ARGS="-d $MNTUS_DEV"
fi

case "$1" in
        start)
                if [ -x "$DAEMON" ]; then
                        msg "starting $NAME" I
            $PMOND_START $CONF_NAME
            echo /dev/mmcblk0p4 > /sys/devices/platform/arc_udc/gadget/gadget-lun0/file
                fi
                ;;
        stop)
                if [ -r "$PIDFILE" ]; then
                        msg "stopping $NAME" I
                    $PMOND_STOP $CONF_NAME
fi
                ;;
        *)
                msg "Usage: /etc/init.d/$NAME {start|stop}" W >&2
                exit 1
                ;;

esac

exit 0
h1uke is offline   Reply With Quote