On Thu, July 13, 2006 7:59 am, Wilhelm Meier wrote:
> Jim,
>
> thanks for the reply, but PLEASE HOLD ON=21
Ok,
Just let me know when you've got it fixed.
Jim.
> It's the correct description but the wrong patch (there is something
> included
> that definitely breaks LTSP: the fixed mountpoint patch).
>
> Sorry for the noise - I'll send the correct patch later.
>
> --
> Wilhelm
>
> Am Donnerstag, 13. Juli 2006 13:49 schrieb Jim McQuillan:
>> Wilhelm,
>>
>> Very interesting. I'll pass this on to Scott Balneaves.
>>
>> Thanks,
>> Jim McQuillan
>> jam=40Ltsp.org
>>
>> Wilhelm Meier wrote:
>> > Hi,
>> >
>> > I'm using the ltspfs in our Gentoo-Rich-Client (diskless and
>> > thin-clients) setup. Due to the slightly different setup compared to=
>> LTSP
>> > I found it usefull to get the following functionality:
>> >
>> > i) umount the ltspfs on the terminal-server-side if ltspfs receives
>> > SIGHUP
>> >
>> > ii) disable the mounting/umounting of ltspfsd on the rich-client via=
>> > option '-m'
>> >
>> > I think this doesn't break things on the LTSP usage of ltspfs.
>> >
>> > Best Regards,
>> >
>> > Wilhelm
>> >
>> >
>> > --------------------------------------------------------------------=
----
>> >
>> > Only in ltspfs: .deps
>> > Only in ltspfs: Makefile
>> > Only in ltspfs: config.log
>> > Only in ltspfs: config.status
>> > Only in ltspfs: ltspfs
>> > Only in ltspfs: ltspfs-common.o
>> > Only in ltspfs: ltspfs-ltspfs.o
>> > diff -rup ltspfs/ltspfs.c ltspfs-mod/ltspfs.c
>> > --- ltspfs/ltspfs.c=092006-07-11 11:54:09.000000000 +0200
>> > +++ ltspfs-mod/ltspfs.c=092006-07-13 12:38:33.000000000 +0200
>> > =40=40 -47,6 +47,10 =40=40 init_pkt(XDR *in, XDR *out, char *inbuf,
>> > xdr_int(out, &i);=09=09=09=09/* reserve length field */
>> > =7D
>> >
>> > +void
>> > +sighuphandler(int signal) =7B
>> > + timeout();
>> > +=7D
>> >
>> > /*
>> > * timeout():
>> > =40=40 -1176,6 +1180,19 =40=40 main (int argc, char *argv=5B=5D)
>> > exit(0);
>> > =7D
>> >
>> > + // install the signalhandler to proper umount and exit if SIGHUP
>> > +
>> > + struct sigaction sa;
>> > + sa.sa_handler =3D sighuphandler;
>> > + sigemptyset(&sa.sa_mask);
>> > + sa.sa_flags =3D 0;
>> > +
>> > + if (sigaction(SIGHUP, &sa, NULL)) =7B
>> > + perror(=22sigaction=22);
>> > + exit(EXIT_FAILURE);
>> > + =7D
>> > +
>> > +
>> > /*
>> > * Open up our socket
>> > */
>> >
>> > --------------------------------------------------------------------=
----
>> >
>> > diff -rup ltspfsd/common.h ltspfsd-mod/common.h
>> > --- ltspfsd/common.h=092006-02-19 05:03:27.000000000 +0100
>> > +++ ltspfsd-mod/common.h=092006-07-13 13:02:47.000000000 +0200
>> > =40=40 -17,6 +17,7 =40=40
>> >
>> > extern int syslogopen;
>> > extern int debug;
>> > +extern int should_mount;
>> >
>> > /*
>> > * function prototypes
>> > Only in ltspfsd-mod: common.h.=7E1.9.=7E
>> > diff -rup ltspfsd/ltspfsd.c ltspfsd-mod/ltspfsd.c
>> > --- ltspfsd/ltspfsd.c=092006-05-12 04:33:45.000000000 +0200
>> > +++ ltspfsd-mod/ltspfsd.c=092006-07-13 13:04:28.000000000 +0200
>> > =40=40 -35,6 +35,11 =40=40 char *mountpoint;=09=09/* Point we're =22=
mou
>> > int authenticated;=09/* Mountpoint length */
>> > int mounted;=09=09=09/* Automounter status */
>> >
>> > +// if we should do the mount/umount stuff
>> > +// option -m disables this
>> > +int=09should_mount =3D 1;
>> > +
>> > +
>> > /*
>> > * mainline
>> > */
>> > =40=40 -57,7 +62,7 =40=40 int main(int argc, char *argv=5B=5D)
>> >
>> > debug =3D readonly =3D opterr =3D noauth =3D 0;
>> >
>> > - while ((c =3D getopt (argc, argv, =22rad=22)) =21=3D -1) =7B
>> > + while ((c =3D getopt (argc, argv, =22radm=22)) =21=3D -1) =7B
>> > switch (c) =7B
>> > case 'r':
>> > readonly++;
>> > =40=40 -68,6 +73,9 =40=40 int main(int argc, char *argv=5B=5D)
>> > case 'd':
>> > debug++;
>> > break;
>> > + case 'm':
>> > +=09should_mount =3D 0;
>> > +=09break;
>> > case '?':
>> > fprintf (stderr, =22Unknown option character =60=5C=5Cx%x'.=
=5Cn=22,
>> optopt);
>> > return 1;
>> > =40=40 -185,7 +193,9 =40=40 void handle_connection(int sockfd)
>> > error_die(=22handle_connection: select error=5Cn=22);
>> > else if (r =3D=3D 0) =7B
>> > if (mounted)
>> > - am_umount(mountpoint);=09=09/* this will return */
>> > +=09 if (should_mount) =7B
>> > +=09 am_umount(mountpoint);=09=09/* this will return */
>> > +=09 =7D
>> > continue;=09=09=09/* Back to the top of the for(;;) loop */
>> > =7D
>> >
>> > Only in ltspfsd-mod: ltspfsd.c.=7E1.16.=7E
>> > diff -rup ltspfsd/ltspfsd_functions.c ltspfsd-mod/ltspfsd_functions.=
c
>> > --- ltspfsd/ltspfsd_functions.c=092006-05-12 04:24:45.000000000 +020=
0
>> > +++ ltspfsd-mod/ltspfsd_functions.c=092006-07-13 13:03:32.000000000
>> +0200
>> > =40=40 -129,9 +129,10 =40=40 ltspfs_dispatch (int sockfd, XDR *in)
>> > =7D else if (packet_type =3D=3D LTSPFS_PING) =7B
>> > ltspfs_ping(sockfd);
>> > =7D else =7B
>> > - if (=21mounted)
>> > - am_mount(mountpoint);=09=09/* this will return */
>> > -
>> > + if (should_mount) =7B
>> > +=09 if (=21mounted)
>> > +=09 am_mount(mountpoint);=09=09/* this will return */
>> > + =7D
>> > switch(packet_type) =7B
>> > case LTSPFS_GETATTR:
>> > ltspfs_getattr(sockfd, in);
>> > =40=40 -947,7 +948,11 =40=40 handle_mount(int sockfd, XDR *in)
>> > * file, etc. For now, we'll assume it's correct.
>> > */
>> >
>> > - mountpoint =3D strdup(path);
>> > + // mountpoint =3D strdup(path);
>> > + //
>> > + // we use the fixed mount-point /media
>> > + //
>> > + mountpoint =3D strdup(=22/media=22);
>> >
>> > if (debug)
>> > info(=22mount: %s=5Cn=22, mountpoint);
>> > Only in ltspfsd-mod: ltspfsd_functions.c.=7E1.25.=7E
>> >
>> > --------------------------------------------------------------------=
----
>> >
>> >
>> > --------------------------------------------------------------------=
-----
>> > Using Tomcat but need to do more? Need to support web services,
>> security?
>> > Get stuff done quickly with pre-integrated technology to make your j=
ob
>> > easier Download IBM WebSphere Application Server v.1.0.1 based on
>> Apache
>> > Geronimo
>> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&=
dat=3D121642
>> >
>> > --------------------------------------------------------------------=
----
>> >
>> > ____________________________________________________________________=
_
>> > Ltsp-developer mailing list. To un-subscribe, or change prefs, got=
o:
>> > https://lists.sourceforge.net/lists/listinfo/ltsp-developer
>> > For additional LTSP help, try =23ltsp channel on irc.freenode.net
>>
>> ----------------------------------------------------------------------=
---
>> Using Tomcat but need to do more? Need to support web services,
>> security?
>> Get stuff done quickly with pre-integrated technology to make your job=
>> easier Download IBM WebSphere Application Server v.1.0.1 based on Apac=
he
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&da=
t=3D121642
>> _____________________________________________________________________
>> Ltsp-developer mailing list. To un-subscribe, or change prefs, goto:=
>> https://lists.sourceforge.net/lists/listinfo/ltsp-developer
>> For additional LTSP help, try =23ltsp channel on irc.freenode.net
>
> --
> Wilhelm Meier
> email: wilhelm.meier=40fh-kl.de
>
>
> -----------------------------------------------------------------------=
--
> Using Tomcat but need to do more? Need to support web services, securit=
y?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geron=
imo
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> _____________________________________________________________________
> Ltsp-developer mailing list. To un-subscribe, or change prefs, goto:
> https://lists.sourceforge.net/lists/listinfo/ltsp-developer
> For additional LTSP help, try =23ltsp channel on irc.freenode.net
>
|