Here is the script code from an upstart job I'm trying to get working (but which doesn't work yet):

    # test for a fat client:
    if [[ $(hostname | grep 'ltsp') == ltsp* ]]; then
sed 's/mount_removable=0/mount_removable=1/' <~/.config/pcmanfm/lubuntu/pcmanfm.conf >~/.config/pcmanfm/lubuntu/pcmanfm.conf
    # test for a thin client:
    elif [ -n "$LTSP_CLIENT" ]; then
sed 's/mount_removable=1/mount_removable=0/' <~/.config/pcmanfm/lubuntu/pcmanfm.conf >~/.config/pcmanfm/lubuntu/pcmanfm.conf
    # machine must be the server
    else
sed 's/mount_removable=0/mount_removable=1/' <~/.config/pcmanfm/lubuntu/pcmanfm.conf >~/.config/pcmanfm/lubuntu/pcmanfm.conf
    fi

Assuming that it was tripping on ~, I also tried:

    # test for a fat client:
    if [[ $(hostname | grep 'ltsp') == ltsp* ]]; then
sed 's/mount_removable=0/mount_removable=1/' <$HOME/.config/pcmanfm/lubuntu/pcmanfm.conf >$HOME/.config/pcmanfm/lubuntu/pcmanfm.conf
    # test for a thin client:
    elif [ -n "$LTSP_CLIENT" ]; then
sed 's/mount_removable=1/mount_removable=0/' <$HOME/.config/pcmanfm/lubuntu/pcmanfm.conf >$HOME/.config/pcmanfm/lubuntu/pcmanfm.conf
    # machine must be the server
    else
sed 's/mount_removable=0/mount_removable=1/' <$HOME/.config/pcmanfm/lubuntu/pcmanfm.conf >$HOME/.config/pcmanfm/lubuntu/pcmanfm.conf
    fi

I'm guessing that my file identification strings need fixing up, but I'm such a poor scripter that this could only be one of several mistakes.

Check my homework?

--
Lubuntu-users mailing list
Lubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/lubuntu-users

Reply via email to