On 08/06/2013 05:40 AM, Jerry Vonau wrote:
Think the attachment got scrubbed in digest mode. Can you reply to this
tread with the contents of 20-xc-generic script please?
#!/bin/bash
# Author: Daniel Drake <d...@laptop.org>
# XS auto-usbmount import script for code parts of the e-library
#modified for Rwanda configuration <tony_ander...@usa.net>
# execute XC-install if found
set -e

VERBOSE=no

# Log a string via the syslog facility.
log()
{
    if test $1 != debug || expr "$VERBOSE" : "[yY]" > /dev/null; then
        logger -p user.$1 -t "rwxc-code[$$]" -- "$2"
        echo "$(date "+%F %T") rwxc-code: $2"
    fi
}

error_beep()
{
    echo -en '\033[10;1000]\033[11;100]\007' > /dev/console
    sleep 0.2
    echo -en '\033[10;1000]\033[11;100]\007' > /dev/console
    sleep 0.2
    echo -en '\033[10]\033[11]' > /dev/console
    return 0
}

if [ -f "$UM_MOUNTPOINT"/XC/xc-install ]; then
        exec >> $UM_MOUNTPOINT/xc-usbmount.txt 2>&1
fi

if [ -f "$UM_MOUNTPOINT"/xc.*.tar.bz2 ]; then
        exec >> $UM_MOUNTPOINT/xc-usbmount.txt 2>&1
fi

if [ -f "$UM_MOUNTPOINT"/xc.*.tar.bz2 ]; then
        log notice "Updating School Server"
        rm -rf /library/update
        mkdir /library/update
        cp "$UM_MOUNTPOINT"/xc.*tar.bz2 /library/update
        cd /library/update
        tar -xvf xc.*.tar.bz2
        if bash xc-update; then
            log notice "School server updated successfully"
        else
            log notice "School server update failed with code $?"
            error_beep
        fi
fi

if [ -f "$UM_MOUNTPOINT"/XC/xc-install ]; then
    log notice "Installing XC"
    cd $UM_MOUNTPOINT/XC
    if bash xc-install; then
        log notice "XC installed successfully"
    else
        log notice "XC install failed with code $?"
        error_beep
    fi
fi
_______________________________________________
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel

Reply via email to