Re: cifs 1.50 and dosemu 1.4 great combination

kemas
2007-10-15T03:23:24Z

Hi Alain,
sorry for long reply, I was on national holiday for 2days.

> > cifs does not replace samba, samba still the file server.
> >
> > cifs is use as the filesystem to mount samba share, then dosemu would run our program on
> > lredired drive.
> > the lock here means file locking between multiuser apps that use the same file.
>
> Could you give setup commands? This may interest more people, so I am
> bringing it back to the list...
>
> I am not sure that I understand: You have a samba server, maybe even on
> the same machine; cifs then replaces samba-client, on every machine;
> then dosemu relays the file-locks correctly. Are you using freeDOS?
>

Our setup is like this
- 1 server
-- LTSP 4.2
use for the diskless client, booting through PXE.
we have mixed environment ;=)
-- SAMBA
use to for dos clipper/foxpro application.
in smb.conf we set 'cifs extensions = no', so samba will behave
more like windows server, written in the documentation.

- 3 client with harddisk
-- centos 5
--- desktop IceWM
--- upgrade to cups 1.3
--- dosemu 1.4
--- upgrade to cifs 1,5
--- wine 0.9.36

- 10 LTSP client
-- same like server

the server have several shared directories
\\bigdady\administrations
\\bigdady\public
\\bigdady\someshare

CLIENT SETUP
------------

* mount server share

because our user is not linux friendly,
we make some shortcut for the client so when they entered dosemu they
will get the server shared already connected.

we put in autoexec.bat something like this, both for the

unix connectsmb.sh
lredir f: /home/user/mount
f:

the content of connectsmb.sh, the conditional test for the same user
does not mount multiple time if they already have the share mounted.

statusq=`df -h 2> /dev/null|grep $HOME/mount|awk '{ print $5 }'`
if [ -z $statusq ]; then
sudo mount -t cifs \\bigdady\administrations /home/user/mount
-o username=myuser,password=mypassword,uid=myuser,gid=myusergid,
nounix,direct
fi

* printing, for printing we use cups 1.3.

for LTSP client, we create .dosemurc that define their personalize
printer.
printing parameter has change from dosemu 1.2 to 1.4
so in .dosemurc we put
$_lpt1 = "lpr -l -P lq2180"
$_printer_timeout = (2)

for the client with harddisk is more simple, we put in dosemu.conf
global for all the user.
$_lpt1 = "lpr -l -P lq2180_local"
$_printer_timeout = (2)

* finishing

because the server is not 24 hour running (workhour only 08:00am to
10:00pm), it is important to make sure that all the ltsp client
disconnect from using the server shared properly.
so instead telling the user to use exitemu to exit dosemu, we make some
batchfile to unmount the shared and then exit from dosemu (lets just
call it timeout.bat).
timeout.bat
c:
unix sudo umount /home/myuser/mount
exitemu
because mount will not work if user have open several dosemu
session, so it is safe to do it like this.

> Sorry if I may seam a little dumb, but some time ago Bart said that lock
> did NOT work... and I googled about cifs and could not really understand
> the details.
>

yes, we also read it in dosemu 1.4 documentation, that the lock on
lredir drive may or may not work, and $_file_full_locks = (on) may help.
But in my case, if we turn $_file_full_locks = (on) it will break
things, so we still let $_file_full_locks = (off).

thanks