Am Dienstag 04 August 2009 22:58:17 schrieb MossBeep:
> Does anyone out there have anything for me? Please
>
> MossBeep wrote:
> > Yes, any help would be greatly appreciated.
> >
> > I have been trying the same thing and nothing works.
> > Where do scripts have to be placed so that they run?
> > I have tryed placing the script into the home dir and also the root dir
> > and it still does not work.
> >
> > MossBeep
> >
> > discsox wrote:
> >> Does anybody have working scripts that are executed on startup of the
> >> OTC.
> >> Putting custom a directory under C:\Program
> >> Files\openthinclient\server\default\data\nfs that contains a script file
> >> does not seem to do anything.
> >>
> >> Any help is greatly appreciated.
> >>
> >> Cheers Marcello
Hello MossPeep

here is wot i have so fare.
You will need a development environment. Pleas follow the instruction on 
http://openthinclient.org/openThinClient%20OS%20for%20Developers?structure=documentation.
Then create you own package. The package will use to scripts. First will add a 
line to sudoers to get the root right to mount the file System. The second 
script will mount the file system when the user login.     

first script: mountshare/mountshare-0.0.1/tcos/rcS.d/mountshare
#!/bin/bash

# Erlaube allen useren /opt/mountshare/mountshare.sh als root ohne password 
auszufüren

echo "%users ALL= NOPASSWD: /opt/mountshare/mountshare.sh" >> /etc/sudoers

second script: mountshare/mountshare-0.0.1/mountshare/mountshare.sh
#!/bin/bash

if [ "$USER" != "root" ]; then
        sudo /opt/mountshare/mountshare.sh $USER $@
else
        USER=$1
        CREDENTIALS=/home/tcos/.credentials
        MOUNTPOINT=CIFS
        UNC=//nas/daten
        for par in $@ ; do
                [ "${par:0:4}" == "UNC=" ] && UNC=${par#UNC=}
                [ "${par:0:11}" == "MOUNTPOINT=" ] && 
MOUNTPOINT=${par#MOUNTPOINT=}
        done
        if mount | grep "$UNC" ; then
                echo "$UNC" bereits gemauntet
        else
                [ ! -e /media/$MOUNTPOINT ] && mkdir /media/$MOUNTPOINT
                mount -t cifs -o credentials=$CREDENTIALS,uid=$USER,gid=users 
$UNC /media/$MOUNTPOINT
        fi

fi

Make sure to adjust the executable in the 
mountshare/mountshare-0.0.1/tcos/launcher

the Developer's Gide explain how to build and add this to your openthinclient 
environment.
This package will need a file in each homedir containing the username, password 
and maybe domain, see man mount.cifs for more information. (YES this is a 
securety problem)
Now you can crate a Application for each share you like to mount. To specify 
the share you like to mount set this parameters UNC=//server/share 
MOUNTPOINT=name.

For sure this is not perfect but a good start. 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
The Open Source Thin Client Solution http://openthinclient.org
openthinclient-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openthinclient-user

Reply via email to