Re: devd based AUTOMOUNTER

2012-02-29 Thread vermaden
Ian Smith smi...@nimnet.asn.au pisze: On Tue, 28 Feb 2012, vermaden wrote: Andriy Gapon pisze: on 29/02/2012 00:04 vermaden said the following: Andriy Gapon said: on 28/02/2012 17:26 Alexander Leidinger said the following: The kernel does not poll for CD changes, and the

Re: devd based AUTOMOUNTER

2012-02-29 Thread Ivan Klymenko
Note also that the above entry for cd0 does NOT change after inserting various different data CDs, all different sizes, nor after mounting one, so that 534181888 entry is from some time before, perhaps the first CD inserted after boot, not sure? Also the sizes are bytes, regardless of

Re: devd based AUTOMOUNTER

2012-02-29 Thread vermaden
Ivan Klymenko fi...@ukr.net pisze: Note also that the above entry for cd0 does NOT change after inserting various different data CDs, all different sizes, nor after mounting one, so that 534181888 entry is from some time before, perhaps the first CD inserted after boot, not sure? Also

Re: devd based AUTOMOUNTER

2012-02-29 Thread Ivan Klymenko
В Wed, 29 Feb 2012 13:24:17 +0100 vermaden verma...@interia.pl пишет: Ivan Klymenko fi...@ukr.net pisze: Note also that the above entry for cd0 does NOT change after inserting various different data CDs, all different sizes, nor after mounting one, so that 534181888 entry is from

Re: devd based AUTOMOUNTER

2012-02-28 Thread Alexander Leidinger
Quoting vermaden verma...@interia.pl (from Mon, 27 Feb 2012 21:36:46 +0100): Unfortunately, I spent a few days that would have to understand how it is possible to detect the inserted CD-ROM with devd; but alas - the only thing that detects changes in the drive CD-ROM - a :sysctl

Re: devd based AUTOMOUNTER

2012-02-28 Thread Andriy Gapon
on 28/02/2012 17:26 Alexander Leidinger said the following: The kernel does not poll for CD changes, and the people guarding the relevant CD code where against something like this in the kernel everytime this came up in the past. So no devd event for this. My impression was that lately

Re: devd based AUTOMOUNTER

2012-02-28 Thread vermaden
Andriy Gapon a...@freebsd.org said: on 28/02/2012 17:26 Alexander Leidinger said the following: The kernel does not poll for CD changes, and the people guarding the relevant CD code where against something like this in the kernel everytime this came up in the past. So no devd event

Re: devd based AUTOMOUNTER

2012-02-28 Thread Andriy Gapon
on 29/02/2012 00:04 vermaden said the following: Andriy Gapon a...@freebsd.org said: on 28/02/2012 17:26 Alexander Leidinger said the following: The kernel does not poll for CD changes, and the people guarding the relevant CD code where against something like this in the kernel everytime

Re: devd based AUTOMOUNTER

2012-02-28 Thread vermaden
Andriy Gapon a...@freebsd.org pisze: on 29/02/2012 00:04 vermaden said the following: Andriy Gapon said: on 28/02/2012 17:26 Alexander Leidinger said the following: The kernel does not poll for CD changes, and the people guarding the relevant CD code where against something like this

Re: devd based AUTOMOUNTER

2012-02-28 Thread Ian Smith
On Tue, 28 Feb 2012, vermaden wrote: Andriy Gapon a...@freebsd.org pisze: on 29/02/2012 00:04 vermaden said the following: Andriy Gapon said: on 28/02/2012 17:26 Alexander Leidinger said the following: The kernel does not poll for CD changes, and the people guarding the

Re: devd based AUTOMOUNTER

2012-02-27 Thread vermaden
Hi, I have been pretty busy lately because of boring things work/life stuff, but here is the new version, with more options of course and some bugs fixed, it now displays help when triggered as 'automount --help', at least a substitute of a man page ;) I have a quastion, which devd(8) events

Re: devd based AUTOMOUNTER

2012-02-27 Thread Ivan Klymenko
Hi, I have been pretty busy lately because of boring things work/life stuff, but here is the new version, with more options of course and some bugs fixed, it now displays help when triggered as 'automount --help', at least a substitute of a man page ;) I have a quastion, which devd(8)

Re: devd based AUTOMOUNTER

2012-02-27 Thread Kevin Oberman
On Mon, Feb 27, 2012 at 11:49 AM, vermaden verma...@interia.pl wrote: Hi, I have been pretty busy lately because of boring things work/life stuff, but here is the new version, with more options of course and some bugs fixed, it now displays help when triggered as 'automount --help', at least

Re: devd based AUTOMOUNTER

2012-02-27 Thread vermaden
Have you read the Porter's Handbook (http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook)? It tells you how to make a good port, how to test it (though I don't think it has anything on redports, yet), and how to submit it. I have tried both developers and porters handbooks

Re: devd based AUTOMOUNTER

2012-02-27 Thread Ivan Klymenko
Unfortunately, I spent a few days that would have to understand how it is possible to detect the inserted CD-ROM with devd; but alas - the only thing that detects changes in the drive CD-ROM - a :sysctl kern.geom.conftxt before inserting the disc: kern.geom.conftxt: 0 DISK cd0 0

Re: devd based AUTOMOUNTER

2012-02-27 Thread Kevin Oberman
On Mon, Feb 27, 2012 at 12:36 PM, vermaden verma...@interia.pl wrote: Have you read the Porter's Handbook (http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook)? It tells you how to make a good port, how to test it (though I don't think it has anything on redports, yet), and

Re: devd based AUTOMOUNTER

2012-02-27 Thread vermaden
3.6 Submitting the New Port You submit the port to he ports team and, after review by a ports committer, the port will be added. The cited section describes exactly how to go about it. Be sure that it passes portlint(1) before you submit. It seems that I was little to tired to figure that

Re: devd based AUTOMOUNTER

2012-02-26 Thread Ian Smith
Ccs mightily trimmed to avoid not-subscribed bounces; readd as desired: On Mon, 20 Feb 2012 09:43:59 +0100, vermaden wrote: To: freebsd-hack...@freebsd.org Cc: matt sendtom...@gmail.com, gleb.kurt...@gmail.com, freebsd-stable@freebsd.org, u...@uffe.org, joe.cul...@gmail.com, Hans

Re: devd based AUTOMOUNTER

2012-02-26 Thread Kevin Oberman
On Sun, Feb 26, 2012 at 2:18 AM, Ian Smith smi...@nimnet.asn.au wrote: Ccs mightily trimmed to avoid not-subscribed bounces; readd as desired: On Mon, 20 Feb 2012 09:43:59 +0100, vermaden wrote:   To: freebsd-hack...@freebsd.org   Cc: matt sendtom...@gmail.com, gleb.kurt...@gmail.com,      

Re: devd based AUTOMOUNTER

2012-02-21 Thread vermaden
Hi, I have created a PORT at last, its in the 'port' directory in the usual place: https://github.com/vermaden/automount/ Its my first PORT so feel free to bash me about my mistakes ;) After latest 'commits' I think that its ready for day-to-day use. To make 'full advantage' of *automount*

Re: devd based AUTOMOUNTER

2012-02-20 Thread vermaden
Hi, new version with new features (and BUGs ;p) Added check if ntfsfix from sysutils/ntfsprogs is available, if Yes then try to fix the NTFS filesystem before mouting it. Added GPL3 License ... just joking ;) ... added FreeBSD License to the file. Added 'noatime' as a default mount option when

Re: devd based AUTOMOUNTER

2012-02-20 Thread Andriy Gapon
[cc list trimmed] Hey, this seems like a quite nice tool. Can you create a web-page and/or port for it? It would be more convenient to follow its development that way. Thank you! on 20/02/2012 10:43 vermaden said the following: Hi, new version with new features (and BUGs ;p) Added check

Re: devd based AUTOMOUNTER

2012-02-20 Thread Ivan Klymenko
В Mon, 20 Feb 2012 09:43:59 +0100 vermaden verma...@interia.pl пишет: Hi, new version with new features (and BUGs ;p) Added check if ntfsfix from sysutils/ntfsprogs is available, if Yes then try to fix the NTFS filesystem before mouting it. Added GPL3 License ... just joking ;) ...

Re: devd based AUTOMOUNTER

2012-02-20 Thread vermaden
written by Andriy Gapon ... Hey, this seems like a quite nice tool. Can you create a web-page and/or port for it? It would be more convenient to follow its development that way. Thank you! Sure, its now available here, I will try to create port later: https://github.com/vermaden/automount

Re: devd based AUTOMOUNTER

2012-02-20 Thread vermaden
written by ${ME} ... First BUG: (not fixed yet, but workaround already is working) TEST/BUG/CASE: Plug in FAT32 and NTFS drives at the same time, when FAT32 device will be detected first, it will get mounted and the NTFS drive will be mounted TWICE, so I added __check_already_mounted

Re: devd based AUTOMOUNTER

2012-02-20 Thread Fernando Apesteguía
On Mon, Feb 20, 2012 at 2:27 PM, vermaden verma...@interia.pl wrote: written by ${ME} ... First BUG: (not fixed yet, but workaround already is working) TEST/BUG/CASE: Plug in FAT32 and NTFS drives at the same time, when FAT32 device will be detected first, it will get mounted and the

Re: devd based AUTOMOUNTER

2012-02-20 Thread vermaden
Hi, I removed the state_lock and stat_unlock mechanisms as they appeared to be not needed, I have shufled with 3 drives all the time and the 'integrity' has not been lost, at it was a lot faster, because the lock always had to wait for the 'slowest' drive (in term of initializing the device, like

Re: devd based AUTOMOUNTER

2012-02-19 Thread vermaden
Hi, sorry for late response, but I currently have quite a lot 'weekend activities' that are definitely not near a computer ;) written by Gleb Kurtsou ... __state_lock() { while [ -f ${STATE}.lock ]; do sleep 0.5; done : ${STATE}.lock } Why not keep it stateless, unmounting by hand

Re: devd based AUTOMOUNTER

2012-02-18 Thread vermaden
Added a check if ntfs-3g is available, if not then mount_ntfs is used instead. Added deleting of empty directories at ${MNTPREFIX}. Added ${MNTPREFIX} to be set to /mnt or /media according to preference #! /bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin MNTPREFIX=/media

Re: devd based AUTOMOUNTER

2012-02-18 Thread Hans Petter Selasky
On Saturday 18 February 2012 10:48:11 vermaden wrote: Added a check if ntfs-3g is available, if not then mount_ntfs is used instead. Added deleting of empty directories at ${MNTPREFIX}. Added ${MNTPREFIX} to be set to /mnt or /media according to preference #! /bin/sh

Re: devd based AUTOMOUNTER

2012-02-18 Thread Gleb Kurtsou
On (18/02/2012 10:48), vermaden wrote: Added a check if ntfs-3g is available, if not then mount_ntfs is used instead. Added deleting of empty directories at ${MNTPREFIX}. Added ${MNTPREFIX} to be set to /mnt or /media according to preference #! /bin/sh

Re: devd based AUTOMOUNTER

2012-02-17 Thread vermaden
I already made some changes for the 'better' ... Here is the latest version: #! /bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin LOG=/var/log/automount.log STATE=/var/run/automount.state DATEFMT=%Y-%m-%d %H:%M:%S __create_mount_point() { # /* 1=DEV */ MNT=/mnt/$(

Re: devd based AUTOMOUNTER

2012-02-17 Thread vermaden
... even newer version, seems to have all 'problems' fixed now ;) #! /bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin LOG=/var/log/automount.log STATE=/var/run/automount.state DATEFMT=%Y-%m-%d %H:%M:%S __create_mount_point() { # /* 1=DEV */ MNT=/mnt/$( basename ${1} )

Re: devd based AUTOMOUNTER

2012-02-17 Thread vermaden
Latest version with additional checks for NTFS and FAT32, to be precise, for NTFS filesystem with label FAT and for FAT filesystem with label NTFS ;) #! /bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin LOG=/var/log/automount.log STATE=/var/run/automount.state