Re: malformed man pages [SOLVED]

2009-12-05 Thread Sagara Wijetunga

Dan Nelson wrote:

In the last episode (Dec 05), Sagara Wijetunga said:
  

Dan Nelson wrote:


In the last episode (Dec 04), Sagara Wijetunga said:
  

We have an issue on Tomahawk Desktop (an upcoming FreeBSD-based distro)
that all man pages malformed.

Eg. man tar shows as follows:
1mNAME0m
 1mtar 22m-- format of tape archive files

1mDESCRIPTION0m
 The 1mtar 22marchive format collects any number of files, 
directories, and



That looks sort of like malformed ANSI escape codes (bold would be ESC
[ 1 m, but the man utilities shouldn't be generating those.  If you run
man 5 tar | hd | head, what do you get?  I get this:

  54 41 52 28 35 29 09 09  09 20 20 46 72 65 65 42  |TAR(5)...  FreeB|
0010  53 44 20 46 69 6c 65 20  46 6f 72 6d 61 74 73 20  |SD File Formats |
0020  4d 61 6e 75 61 6c 09 09  09 54 41 52 28 35 29 0a  |Manual...TAR(5).|
0030  0a 4e 08 4e 41 08 41 4d  08 4d 45 08 45 0a 20 20  |.N.NA.AM.ME.E.  |
0040  20 20 20 74 08 74 61 08  61 72 08 72 20 2d 2d 20  |   t.ta.ar.r -- |
0050  66 6f 72 6d 61 74 20 6f  66 20 74 61 70 65 20 61  |format of tape a|
0060  72 63 68 69 76 65 20 66  69 6c 65 73 0a 0a 44 08  |rchive files..D.|
0070  44 45 08 45 53 08 53 43  08 43 52 08 52 49 08 49  |DE.ES.SC.CR.RI.I|
0080  50 08 50 54 08 54 49 08  49 4f 08 4f 4e 08 4e 0a  |P.PT.TI.IO.ON.N.|
0090  20 20 20 20 20 54 68 65  20 74 08 74 61 08 61 72  | The t.ta.ar|

The doubled letters are handled by /usr/bin/less and converted to bold
before displaying.  If you get the same hd output as I have above, then
we know that the manpage is fine, and your problem is in /usr/bin/less
or your terminal type is incorrect.  If you see ANSI escape codes in the
hd output, then we know the problem is with the manpage tools.
  

Here is what I get:

man 5 tar | hd | head

/usr/share/groff/1.20.1/tmac/doc.tmac:3375: bad character definition



^ this looks suspicious. doc.tmac should live at /usr/share/tmac/doc.tmac

  

  54 41 52 28 35 29 09 09  09 20 20 20 20 42 53 44  |TAR(5)...BSD|
0010  20 46 69 6c 65 20 46 6f  72 6d 61 74 73 20 4d 61  |File  Formats Ma|
0020  6e 75 61 6c 09 09 09 54  41 52 28 35 29 0a 0a 31  |nual...TAR(5)..1|
0030  6d 4e 41 4d 45 30 6d 0a  20 20 20 20 20 31 6d 74  |mNAME0m. 1mt|
0040  61 72 20 32 32 6d 2d 2d  20 66 6f 72 6d 61 74 20  |ar 22m-- format |
0050  6f 66 20 74 61 70 65 20  61 72 63 68 69 76 65 20  |of tape archive |
0060  66 69 6c 65 73 0a 0a 31  6d 44 45 53 43 52 49 50  |files..1mDESCRIP|
0070  54 49 4f 4e 30 6d 0a 20  20 20 20 20 54 68 65 20  |TION0m. The |
0080  31 6d 74 61 72 20 32 32  6d 61 72 63 68 69 76 65  |1mtar 22marchive|
0090  20 66 6f 72 6d 61 74 20  63 6f 6c 6c 65 63 74 73  | format collects|
Error executing formatting or display command.
system command exited with status 36096
No entry for tar in section 5 of the manual



^ the above 3 lines you can ignore; man is just complaining because we
^ stopped reading its output after a few lines. 

  
We use /usr/bin/less from ftp://ftp.gnu.org/gnu/less, the 
less-382.tar.gz, unpatched.


Does the less need to be patched in FreeBSD? If so, is there such a 
patch exist?



Since your output differs from mine, the manpages are getting damaged before
they reach /usr/bin/less.

Have you maybe installed your own copy of GNU groff?  The original source
enables ANSI escapes in manpages, but the version in FreeBSD disables them. 
Make sure your /usr/share/tmac/troffrc matches the content at

http://svn.freebsd.org/viewvc/base/stable/8/contrib/groff/tmac/troffrc?view=markup
, especially the last 10 lines or so, and check for other installations of
groff.

  
Yes, we have installed the groff-1.20.1.tar.gz from 
http://www.gnu.org/software/groff/ .


Patch our troffrc to match FreeBSD troffrc solved the problem. Any idea 
is this all we got to do? Anyway, Dan, thank you very much for the info.


Now all most all man pages I checked looks ok except for ls. The man 
page for ls still looks malformed, may be it is cached somewhere.


Regards
Sagara



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: malformed man pages

2009-12-05 Thread Sagara Wijetunga

Charlie Kester wrote:

On Fri 04 Dec 2009 at 22:38:22 PST Sagara Wijetunga wrote:

Michael Powell wrote:

Sagara Wijetunga wrote:

[snip]

We use /usr/bin/less from ftp://ftp.gnu.org/gnu/less, the
less-382.tar.gz, unpatched.


Why?

Does the less need to be patched in FreeBSD? If so, is there such a
patch exist?



Uhmm, this may sound a little strange, but why not use the one 
included as part of the system? In other words, there was no need to 
'install' less. Remove whatever you installed and use the right one. 
It even has a man page, e.g., man less and you will see a man page 
for the included one unless you've made a total mess of your man pages.


I suspect there may be a possibility of bringing Linuxisms to your 
approach to FreeBSD. While there may be some amount of crossover, 
FreeBSD is not Linux. Learn FreeBSD as if it were new to you and 
leave the Linuxisms aside.


-Mike



In Tomahawk Desktop, we try to make as much as possible all 
components of the OS are separately installable by the user, 
therefore, all components are separately upgradeable. We have a 
really running well OS based on FreeBSD sources though there are some 
hopefully minor issues to be resolved. We are about to release the OS

for developer preview.


In other words, you're only using the kernel from FreeBSD, but replacing
all or most of the userland stuff with your own versions? Not only the
stuff in /usr/local/bin but also stuff in /usr/bin?

As Michael said, that's a Linuxism.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org
Yes, mostly we use FreeBSD kernel and libs. Almost everything else is 
installed separately, eg. gcc, binutils, etc. are patched and installed 
under package users. We have so far installed about 550 packages, 
FreeBSD is just one of them. You can list what is installed from FreeBSD 
by running listpkg -s freebsd, -s is to get a sorted output.


But we still use a smaller number of FreeBSD userland stuff for the 
moment but the objective is to drop that also in our future versions and 
replace them with proper packages from original projects.


You may call it Linuxism but we have produced an user upgradeable 
system, our users do not have wait till ports are ready, eg, Qt 4.6 is 
not ready on FreeBSD ports tree, we are releasing Tomahawk Desktop with 
Qt 4.6, OpenVG, etc. To install KDE 4.4, you just download the sources 
and compile, that's all. We are not 100% ready but we are at least 99% 
there. Hopefully many may appreciate our efforts.


Regards
Sagara





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


malformed man pages

2009-12-04 Thread Sagara Wijetunga

Hi FreeBSD community

We have an issue on Tomahawk Desktop (an upcoming FreeBSD-based distro) 
that all man pages malformed.


Eg. man tar shows as follows:
1mNAME0m
1mtar 22m-- format of tape archive files

1mDESCRIPTION0m
The 1mtar 22marchive format collects any number of files, 
directories, and


What have we missed?

Kind regards
Sagara


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: malformed man pages

2009-12-04 Thread Sagara Wijetunga

Boris Samorodov wrote:

Hi,

On Fri, 04 Dec 2009 16:50:31 +0800 Sagara Wijetunga wrote:

  

We have an issue on Tomahawk Desktop (an upcoming FreeBSD-based
distro) that all man pages malformed.



What is the base FreeBSD version?

  

FreeBSD 7.2


Eg. man tar shows as follows:
1mNAME0m
1mtar 22m-- format of tape archive files



  

1mDESCRIPTION0m
The 1mtar 22marchive format collects any number of files,
directories, and



What are your terminal, locale, fonts?

  

echo $TERM
xterm-color

How do I know what locale and fonts are effective?

Our default in /etc/login.conf is same as FreeBSD's.

What have we missed?



Well, there were good old days ;-) when the grass was green
and manual pages were written in plain ASCII. Those days
passed, welcome to the shiny future. Manual pages have
colors, belts and whistles and can be viewed only at xterm
and with some fonts.

*sign* bsam, who used a copy-n-paste from DISKLESS(8) and
lost nfs connectivity.

  


Regards
Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: malformed man pages

2009-12-04 Thread Sagara Wijetunga

Dan Nelson wrote:

In the last episode (Dec 04), Sagara Wijetunga said:
  

Hi FreeBSD community

We have an issue on Tomahawk Desktop (an upcoming FreeBSD-based distro)
that all man pages malformed.

Eg. man tar shows as follows:
1mNAME0m
 1mtar 22m-- format of tape archive files

1mDESCRIPTION0m
 The 1mtar 22marchive format collects any number of files, 
directories, and



That looks sort of like malformed ANSI escape codes (bold would be ESC [ 1
m, but the man utilities shouldn't be generating those.  If you run man 5
tar | hd | head, what do you get?  I get this:

  54 41 52 28 35 29 09 09  09 20 20 46 72 65 65 42  |TAR(5)...  FreeB|
0010  53 44 20 46 69 6c 65 20  46 6f 72 6d 61 74 73 20  |SD File Formats |
0020  4d 61 6e 75 61 6c 09 09  09 54 41 52 28 35 29 0a  |Manual...TAR(5).|
0030  0a 4e 08 4e 41 08 41 4d  08 4d 45 08 45 0a 20 20  |.N.NA.AM.ME.E.  |
0040  20 20 20 74 08 74 61 08  61 72 08 72 20 2d 2d 20  |   t.ta.ar.r -- |
0050  66 6f 72 6d 61 74 20 6f  66 20 74 61 70 65 20 61  |format of tape a|
0060  72 63 68 69 76 65 20 66  69 6c 65 73 0a 0a 44 08  |rchive files..D.|
0070  44 45 08 45 53 08 53 43  08 43 52 08 52 49 08 49  |DE.ES.SC.CR.RI.I|
0080  50 08 50 54 08 54 49 08  49 4f 08 4f 4e 08 4e 0a  |P.PT.TI.IO.ON.N.|
0090  20 20 20 20 20 54 68 65  20 74 08 74 61 08 61 72  | The t.ta.ar|

The doubled letters are handled by /usr/bin/less and converted to bold
before displaying.  If you get the same hd output as I have above, then we
know that the manpage is fine, and your problem is in /usr/bin/less or your
terminal type is incorrect.  If you see ANSI escape codes in the hd output,
then we know the problem is with the manpage tools.

  

Here is what I get:

man 5 tar | hd | head

/usr/share/groff/1.20.1/tmac/doc.tmac:3375: bad character definition
  54 41 52 28 35 29 09 09  09 20 20 20 20 42 53 44  
|TAR(5)...BSD|
0010  20 46 69 6c 65 20 46 6f  72 6d 61 74 73 20 4d 61  | File 
Formats Ma|
0020  6e 75 61 6c 09 09 09 54  41 52 28 35 29 0a 0a 31  
|nual...TAR(5)..1|
0030  6d 4e 41 4d 45 30 6d 0a  20 20 20 20 20 31 6d 74  
|mNAME0m. 1mt|
0040  61 72 20 32 32 6d 2d 2d  20 66 6f 72 6d 61 74 20  |ar 22m-- 
format |
0050  6f 66 20 74 61 70 65 20  61 72 63 68 69 76 65 20  |of tape 
archive |
0060  66 69 6c 65 73 0a 0a 31  6d 44 45 53 43 52 49 50  
|files..1mDESCRIP|
0070  54 49 4f 4e 30 6d 0a 20  20 20 20 20 54 68 65 20  |TION0m. 
The |
0080  31 6d 74 61 72 20 32 32  6d 61 72 63 68 69 76 65  |1mtar 
22marchive|
0090  20 66 6f 72 6d 61 74 20  63 6f 6c 6c 65 63 74 73  | format 
collects|

Error executing formatting or display command.
system command exited with status 36096
No entry for tar in section 5 of the manual

We use /usr/bin/less from ftp://ftp.gnu.org/gnu/less, the 
less-382.tar.gz, unpatched.


Does the less need to be patched in FreeBSD? If so, is there such a 
patch exist?


Regards
Sagara

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: malformed man pages

2009-12-04 Thread Sagara Wijetunga

Michael Powell wrote:

Sagara Wijetunga wrote:

[snip]
  

We use /usr/bin/less from ftp://ftp.gnu.org/gnu/less, the
less-382.tar.gz, unpatched.



Why?
 
  

Does the less need to be patched in FreeBSD? If so, is there such a
patch exist?




Uhmm, this may sound a little strange, but why not use the one included as 
part of the system? In other words, there was no need to 'install' less. 
Remove whatever you installed and use the right one. It even has a man page, 
e.g., man less and you will see a man page for the included one unless 
you've made a total mess of your man pages.


I suspect there may be a possibility of bringing Linuxisms to your 
approach to FreeBSD. While there may be some amount of crossover, FreeBSD is 
not Linux. Learn FreeBSD as if it were new to you and leave the Linuxisms 
aside.


-Mike



  
In Tomahawk Desktop, we try to make as much as possible all components 
of the OS are separately installable by the user, therefore, all 
components are separately upgradeable. We have a really running well OS 
based on FreeBSD sources though there are some hopefully minor issues to 
be resolved. We are about to release the OS for developer preview.


As the less we installed was too old, we have upgraded our less to 
less-436.tar.gz from http://www.greenwoodsoftware.com/less/. Again 
unpatched.


The result is the same. Are we sure less is the culprit?

Regards
Sagara


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


How to setup mDNSResponder on FreeBSD?

2009-09-12 Thread Sagara Wijetunga

Hi all

I have installed the net/mDNSResponder port on a FreeBSD 7.2 i386 
computer. Set to launch the mdnsd on start up (in /etc/rc.conf).  
Changed hosts line in /etc/nsswitch.conf to hosts: files mdns dns. 
Rebooted.


mDNSIdentify name.local immediately shows the IP address of the other 
computer but ping name.local shows following message:

ping: cannot resolve name.local: Unknown host

Its the same for ssh too. Is there anything else to set up in FreeBSD?

Appreciate your reply.

Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Server screwed up (/lib/libc.so.7: Undefined symbol _nsdispatch)

2009-07-14 Thread Sagara Wijetunga
Victor Starenky writes: 


Hi guys,
I was running FreeBSD server at home for a few years on an old box for mail,
some web and ftp etc. I've been through a number of upgrades even though
it's not easy with the box as old as this one (PII 350). Right now I'm at
7.0 Release.
Now last weekend something's screwed up there pretty badly and machine is
pretty much unusable.
The sympthom is that pretty much any command results in the following error:
/libexec/ld-elf.so.1: /lib/libc.so.7: Undefined symbol _nsdispatch
Specifically this is thrown when trying to login (after entering login name)
on the console, ssh, ftp.
This is also thrown for fetchor for ls -l (plain ls works).
So I'm lucky to have one root session on the console as I can't login at any
other...
Most recent thing that might have something to do with it would be an
(unsuccessful) attempt to portupgrade cups-base. This failed with the error
message of wrong cups client. Now this is not new and I have a number of
ports that wouldn't upgrade - cups-base, apache for example. But before
portupgrade would fail without affecting the system. Same cups-base failed
before without any side effects.
As I said this might have nothing to do with the errors I'm getting, just
most recent my actions.
So currently server is not usable - it won't even accept mail (Currier
server) with the same error message.
I tried portupgrade bash but portupgrade itslef also fails with the same
message. I do have one mean of getting new files there through mounted smb
directory. I've tried putting all new bash files into
/usr/ports/distfiles/bash but portupgrade still fails (just a bit further
now).
I ran pkg_libchk which shows a bunch of missing libraries, mostly for
compat4x-i386-5.3_9 but for example courier also misses one:
courier-0.54.0: /usr/local/libexec/filters/perlfilter misses libperl.so
At this point I think I'm lost. I'd really rather avoid complete reinstall
of the server if possible.
I would greatly appreciate any help troubleshooting the libraries. Still
hope there is something that can be done other than reinstall.
Thanks in advance!
Victor


Hi Victor 

What you could do is put it back what is missing/damaged using an live 
FreeBSD CD and get the base system to work again without any GUI. 


Regards
Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Server screwed up (/lib/libc.so.7: Undefined symbol _nsdispatch)

2009-07-14 Thread Sagara Wijetunga
Victor Starenky writes: 


Actually I am running this without GUI (X is a luxury on this machine) .But
if I restore it from the live CD I understand that all ports I have will be
messed up?


You build ports on top of a working base. Now your foundation, aka the base 
has gone wrong. What you got to do is to get the base working again. 

Actually the first thing you should try is, to compile the base and the 
kernel (buildworld, buildkernel, etc) and install them properly. Check every 
stage complete without any error. If you can reinstall your base without any 
error, your base is working. Then you can rebuild your ports. 

If you cannot, recompile your base, ie. if errors develops, then copy 
necessary libs, etc. from the live CD till your recompile the base completes 
without errors. 




So my only option would be to go and install/reinstall all of them from the
scratch? Building anything that needs Ruby for example takes like 24 hours
on this machine :(


This is your last option. 


Regards
Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Server screwed up (/lib/libc.so.7: Undefined symbol _nsdispatch)

2009-07-14 Thread Sagara Wijetunga
Victor Starenky writes: 


Sorry for the lame question. But how exactly would I go about recompiling
the base?Could you point me to any articles/manuals about it? I'm just
trying to understand which steps exactly need to be done and how to do it.
Compiling everything would take me a few weeks on this machine :( 



Oops, I just explain is a brain surgery :) 

Are you sure that you cannot let go your server, erase everything, reinstall 
and restore from a backup? That's the easiest. 


Regards
Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why this flash drive not detected in devd?

2009-07-13 Thread Sagara Wijetunga
Mel Flynn writes: 

On Saturday 11 July 2009 00:36:09 Sagara Wijetunga wrote: 


I prefer to handle mounting through an automounter even without KDE
running.


I think most users want to handle the disk based on the content not on the 
device that has the disk. Ideally I would want my desktop to:

1) automount below a root that I can configure
2) when a disk is labeled, use the lowercase version of the label as 
mountpoint, resolving conflicts using 2-digit serial suffixes.
3) when a disk is not labeled, mount it temporarily using a unique name (f.e. 
using uuid(3)), provide me with an option to label it
   a) if yes, label and remount, asking me to abort if this means disk content 
gets lost
   b) if no, show me where it's mounted. 

Of course, YMMV, but I really don't care if my SD card with my photos is in 
the built-in SD card holder, in the camera itself or on an USB SD card reader 
I plugged in. I want my photos to be under ~/photos each time.

--
Mel


Hi Mel 

Thanks for your feedback. 

Our Tomahawk Desktop (http://www.tomahawkcomputers.com/) is targeted for end 
users, from years two (2) onwards :) My son is now two and quarter. He plays 
music, just drag and drop music files (flac) to Xine, play videos, draw 
stars, circles, cars, parrots, etc. on Inkscape, see his photos, etc. on 
Tomahawk Desktop. 

Here is what we have done five years ago based on Linux and how people used 
Tomahawk Desktop 1.x series. 

You plug in your Thumb drive and go to /media/thumdrive and access your 
thumb drive. Close your app (eg. Konqueror), system automatically unmount 
the thumb drive for you. An average Tomahawk Desktop 1.x user is not even 
aware that there is such thing as mount and unmount of devices. Its just 
plug and play for them. 

You plug in your camera and go to /media/camera and access your camera. Just 
drag and drop your photos or videos to your computer or transfer to another 
thumb drive. 

Now we have switched to FreeBSD from Linux. We would still like to offer 
this feature as a minimum for Tomahawk Desktop users. We do not want to tell 
our users it is not supported on FreeBSD, therefore, you are crippled now. 

Knowing that a device has been created with the device name da0 or da0s1 is 
insufficient for us to determine whether that device is a thumb drive, 
camera, audio player, etc. 

We need another event to devd once the device (eg. da0, da1, etc) is known 
with minimum vendor and product ids. For this purpose, we would like to 
modify the USB sub system. We need help in this regard. 

I have posted another post to freebsd-stable list titled “FreeBSD 7.2 USB 
stack info needed”. Please reply if you do have time. 


Best regards
Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why this flash drive not detected in devd?

2009-07-11 Thread Sagara Wijetunga
Roland Smith writes: 


On Thu, Jul 09, 2009 at 08:41:28PM -0500, Sagara Wijetunga wrote:
 Roland Smith writes: 

   On Thu, Jul 09, 2009 at 11:22:16PM +0800, Sagara Wijetunga wrote: 

 Hi FreeBSD community 

 This is FreeBSD 7.2 on i386. 


 sysctl -a | grep dev.umass
 dev.umass.1.%desc: Imation Flash Drive, class 0/0, rev 2.00/1.03, addr 3
 dev.umass.1.%driver: umass
 dev.umass.1.%location: port=6 interface=0
 dev.umass.1.%pnpinfo: vendor=0x0718 product=0x0081 devclass=0x00 
devsubclass=0x00
 release=0x0103 sernum=14925B00 intclass=0x08 intsubclass=0x06
 dev.umass.1.%parent: uhub4 


 Following added to /etc/devd.conf:
  1. Imation Flash Drive, class 0/0, rev 2.00/1.03, addr 3
 attach 200 {
 match vendor  0x0718;
 match product 0x0081;
 match serial  14925B00;
 action touch /tmp/Imation-Flash-Drive-detected;
 }; 

 Could I know why the flash drive is not detected on attach? 


   The USB subsystem isn't currently equipped to notify devd (technically,
   the devctl_notify function isn't used in the USB stack). So the only
   notification you'll get is when devfs creates a device. Since there is
   no predictable link between a USB device and a disk device, info from
   the USB stack would be less then usefull. 


   You can check this by reading from /dev/devctrl (when devd is not
   running, since this device can only be opened by one program at a time)
   just after you plugged in the device. For my usb thumbdrive I get: 


   cat /dev/devctl
   !system=DEVFS subsystem=CDEV type=CREATE cdev=pass2
   !system=DEVFS subsystem=CDEV type=CREATE cdev=da0
   !system=DEVFS subsystem=CDEV type=CREATE cdev=da0s1
   !system=DEVFS subsystem=CDEV type=CREATE cdev=msdosfs/RFS1 

   While sysctl gives: 


   dev.umass.0.%desc: vendor 0x3538 USB Mass Storage Device, class 0/0, rev 
2.00/1.00, addr 2
   dev.umass.0.%driver: umass
   dev.umass.0.%location: port=4 interface=0
   dev.umass.0.%pnpinfo: vendor=0x3538 product=0x0042 devclass=0x00 
devsubclass=0x00 release=0x0100
   sernum=0004E1 intclass=0x08 intsubclass=0x06
   dev.umass.0.%parent: uhub4 


   So for now, you'll have to match on the creation of da* devices, or
   labels if you use those. 

 Roland, thanks for the reply. 


 Here is my side info on FreeBSD 7.2:
 cat /dev/devctl
 ? at port=6 vendor=0x0718 product=0x0081 devclass=0x00 devsubclass=0x00 
release=0x0103
 sernum=14925B00 on uhub4


The ? means Unknown device detected. See devctl(4). This is _not_
noticed be devd, I think 


 +umass1 vendor=0x0718 product=0x0081 devclass=0x00 devsubclass=0x00 
release=0x0103
 sernum=14925B00 intclass=0x08 intsubclass=0x06 at port=6 interface=0 
vendor=0x0718
 product=0x0081 devclass=0x00 devsubclass=0x00 release=0x0103 sernum=14925B00 
intclass=0x08
 intsubclass=0x06 on uhub4


Note that while + denotes a device creation event, it is for umass1,
not for a disk device. 


 !system=DEVFS subsystem=CDEV type=CREATE cdev=pass4
 !system=DEVFS subsystem=CDEV type=CREATE cdev=da4
 !system=DEVFS subsystem=CDEV type=CREATE cdev=da4s1
 !system=DEVFS subsystem=CDEV type=CREATE cdev=msdosfs/ 


 I have few questions:
 1. Above shows info we need available under '?' and '+' lines. What
 we need is vendor, product and sernum. Can these be accessed in
 addition to cdev?


Not currently. The hooks into the USB subsystem are missing.  


But even if they were there, that info is not very usefull in
itself. You also need to know the disk device number that the USB drive
gets! If there were hooks in the USB system, you would get _multiple_
events in devd: 


1) USB device plugged in. (serial no etc...)
2) pass device created by devfs
3) da devices created by devfs
4) msdodfs/ devices created by devfs. 


So you would need to remember the first event until the device creation
happens. Devd itself has no facilities for that. Sure, you can cobble
something together with tempoeary files etc., but that would be fragile. 


And as I've said before, there is no one-on-one link between a USB
device that gets plugged in and the disk device that is assigned to it!
 

 2. Is this issue been fixed in FreeBSD 8.0?


I don't know. The USB stack was rewritten for 8.0. Ask on the -current
or -hackers list.
 

 3. Can you or someone think of a patch against FreeBSD 7.2 to provide
 vendor, product and sernum in addition to cdev? It's very big help
 someone could extend to us to release Tomahawk Desktop


As I explained above, this would not accomplish what you want. 

Again, maybe you should check out sysutils/hal. 



I prefer to handle mounting through an automounter even without KDE running. 


Could I know which program print following lines to the /dev/devctl:
!system=DEVFS subsystem=CDEV type=CREATE cdev=pass4
!system=DEVFS subsystem=CDEV type=CREATE cdev=da4
!system=DEVFS subsystem=CDEV type=CREATE cdev=da4s1
!system=DEVFS subsystem=CDEV type=CREATE cdev=msdosfs/ 

Is there a way in FreeBSD 7.2

Re: How to symlink devfs devices?

2009-07-09 Thread Sagara Wijetunga
Paul B. Mahol writes: 



Is it possible to create a symlink to a device and use the symlink in place
of the real device name in FreeBSD, especially in version 7.2? 


1. A disk
   /dev/camera - /dev/da0s1


devfs.conf(5)


2. A network device
   re0 - lan0


same as above, but there is way to completly hide re0:
# ifconfig re0 name lan0 



Hi FreeBSD community 

Thank you all for replies. 

Yes, USB Mass Storage devices could be symlinked (may be others too) but 
ethernet devices cannot be symlinked but ethernet interfaces can be renamed. 

I have one more question, how do I know what device is attached to an 
ethernet interface after it is renamed? 


Regards
Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


devd configuration questions

2009-07-09 Thread Sagara Wijetunga
Hi FreeBSD community 

I have few questions regarding devd configuration: 

1. What is the difference between attach or notify and when to use them? 

2. What are the possible values for class in attach and detach 
statements? 

3. What are the possible values for subdevice in attach and detach 
statements? 

4. What are the possible values for system, subsystem, type in 
notify statement? 


Kind regards
Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: devd configuration questions

2009-07-09 Thread Sagara Wijetunga

Sagara Wijetunga wrote:

Hi FreeBSD community
I have few questions regarding devd configuration:
1. What is the difference between attach or notify and when to use 
them?
2. What are the possible values for class in attach and detach 
statements?
3. What are the possible values for subdevice in attach and 
detach statements?
4. What are the possible values for system, subsystem, type in 
notify statement?

Kind regards
Sagara
Sorry, I forgot to mention, I need above information regarding FreeBSD 
7.2 (i386).


Regards
Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Why this flash drive not detected in devd?

2009-07-09 Thread Sagara Wijetunga

Hi FreeBSD community

This is FreeBSD 7.2 on i386.

sysctl -a | grep dev.umass
dev.umass.1.%desc: Imation Flash Drive, class 0/0, rev 2.00/1.03, addr 3
dev.umass.1.%driver: umass
dev.umass.1.%location: port=6 interface=0
dev.umass.1.%pnpinfo: vendor=0x0718 product=0x0081 devclass=0x00 
devsubclass=0x00 release=0x0103 sernum=14925B00 intclass=0x08 
intsubclass=0x06

dev.umass.1.%parent: uhub4

Following added to /etc/devd.conf:
# Imation Flash Drive, class 0/0, rev 2.00/1.03, addr 3
attach 200 {
   match vendor  0x0718;
   match product 0x0081;
   match serial  14925B00;
   action touch /tmp/Imation-Flash-Drive-detected;
};


Could I know why the flash drive is not detected on attach?

Kind regards
Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Why this flash drive not detected in devd?

2009-07-09 Thread Sagara Wijetunga
Roland Smith writes: 


On Thu, Jul 09, 2009 at 11:22:16PM +0800, Sagara Wijetunga wrote:
Hi FreeBSD community 

This is FreeBSD 7.2 on i386. 


sysctl -a | grep dev.umass
dev.umass.1.%desc: Imation Flash Drive, class 0/0, rev 2.00/1.03, addr 3
dev.umass.1.%driver: umass
dev.umass.1.%location: port=6 interface=0
dev.umass.1.%pnpinfo: vendor=0x0718 product=0x0081 devclass=0x00 
devsubclass=0x00 release=0x0103 sernum=14925B00 intclass=0x08 
intsubclass=0x06
dev.umass.1.%parent: uhub4 


Following added to /etc/devd.conf:
# Imation Flash Drive, class 0/0, rev 2.00/1.03, addr 3
attach 200 {
match vendor  0x0718;
match product 0x0081;
match serial  14925B00;
action touch /tmp/Imation-Flash-Drive-detected;
}; 



Could I know why the flash drive is not detected on attach?


The USB subsystem isn't currently equipped to notify devd (technically,
the devctl_notify function isn't used in the USB stack). So the only
notification you'll get is when devfs creates a device. Since there is
no predictable link between a USB device and a disk device, info from
the USB stack would be less then usefull. 


You can check this by reading from /dev/devctrl (when devd is not
running, since this device can only be opened by one program at a time)
just after you plugged in the device. For my usb thumbdrive I get: 


cat /dev/devctl
!system=DEVFS subsystem=CDEV type=CREATE cdev=pass2
!system=DEVFS subsystem=CDEV type=CREATE cdev=da0
!system=DEVFS subsystem=CDEV type=CREATE cdev=da0s1
!system=DEVFS subsystem=CDEV type=CREATE cdev=msdosfs/RFS1 

While sysctl gives: 


dev.umass.0.%desc: vendor 0x3538 USB Mass Storage Device, class 0/0, rev 
2.00/1.00, addr 2
dev.umass.0.%driver: umass
dev.umass.0.%location: port=4 interface=0
dev.umass.0.%pnpinfo: vendor=0x3538 product=0x0042 devclass=0x00 devsubclass=0x00 
release=0x0100 sernum=0004E1 intclass=0x08 intsubclass=0x06
dev.umass.0.%parent: uhub4 


So for now, you'll have to match on the creation of da* devices, or
labels if you use those. 



Roland, thanks for the reply. 


Here is my side info on FreeBSD 7.2:
cat /dev/devctl
? at port=6 vendor=0x0718 product=0x0081 devclass=0x00 devsubclass=0x00 
release=0x0103 sernum=14925B00 on uhub4
+umass1 vendor=0x0718 product=0x0081 devclass=0x00 devsubclass=0x00 
release=0x0103 sernum=14925B00 intclass=0x08 intsubclass=0x06 at port=6 
interface=0 vendor=0x0718 product=0x0081 devclass=0x00 devsubclass=0x00 
release=0x0103 sernum=14925B00 intclass=0x08 intsubclass=0x06 on uhub4

!system=DEVFS subsystem=CDEV type=CREATE cdev=pass4
!system=DEVFS subsystem=CDEV type=CREATE cdev=da4
!system=DEVFS subsystem=CDEV type=CREATE cdev=da4s1
!system=DEVFS subsystem=CDEV type=CREATE cdev=msdosfs/ 


I have few questions:
1. Above shows info we need available under '?' and '+' lines. What we need 
is vendor, product and sernum. Can these be accessed in addition to cdev? 

2. Is this issue been fixed in FreeBSD 8.0? 

3. Can you or someone think of a patch against FreeBSD 7.2 to provide 
vendor, product and sernum in addition to cdev? It's very big help someone 
could extend to us to release Tomahawk Desktop without further delay. 


Best regards
Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


How to symlink devfs devices?

2009-07-08 Thread Sagara Wijetunga
Hi 

Is it possible to create a symlink to a device and use the symlink in place 
of the real device name in FreeBSD, especially in version 7.2? 


1. A disk
  /dev/camera - /dev/da0s1 


2. A network device
  re0 - lan0 


Kind regards
Sagara
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org