Re: How to find out which ports contains a specified command.

2009-04-06 Thread Peter Boosten



On 6 apr 2009, at 01:33, Paul Schmehl pschmehl_li...@tx.rr.com wrote:


--On April 5, 2009 6:13:57 PM -0400 ill...@gmail.com wrote:


2009/4/5 Peter Wang peterw...@vip.qq.com:


for example, after i installed pfsense, which is based on freebsd
release 7.1, i found adduser command is missing.

so how to find out which ports contains `adduser' command?
thanks for your replies.



% which adduser
/usr/sbin/adduser

Thus it is part of the base system, installed through /usr/src
rather than /usr/ports.

Also, as you are running (essentially) 7.x, this is probably
better on freebsd-questions than current.


I think you misunderstood his question.

This would be one way to do it:

find /usr/ports/ -type f -exec grep -sq adduser {} \; -print



How about man pkg_info

From memory: pkg_info -W /usr/sbin/adduser

Peter




Paul Schmehl, If it isn't already
obvious, my opinions are my own
and not those of my employer.
**
WARNING: Check the headers before replying

___
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 


___
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: How to find out which ports contains a specified command.

2009-04-06 Thread Oliver Fromme
Peter Boosten wrote:
  Paul Schmehl wrote:
   ill...@gmail.com wrote:
Peter Wang wrote:
 for example, after i installed pfsense, which is based on freebsd
 release 7.1, i found adduser command is missing.
 
 so how to find out which ports contains `adduser' command?
 thanks for your replies.

% which adduser
/usr/sbin/adduser

Thus it is part of the base system, installed through /usr/src
rather than /usr/ports.

Also, as you are running (essentially) 7.x, this is probably
better on freebsd-questions than current.
   
   I think you misunderstood his question.
   
   This would be one way to do it:
   
   find /usr/ports/ -type f -exec grep -sq adduser {} \; -print

That is horribly inefficient because it forks a separate
grep process for every single file under /usr/ports.
Also it will print a lot of false positive, because the
ports tree contains several files and scripts that call
adduser.

  How about man pkg_info
  
   From memory: pkg_info -W /usr/sbin/adduser

That won't work, because pkg_info only reports information
about packages that you have installed.

One way to find which ports provide a certain file is to
use the porgle search engine:

http://www.secnetix.de/tools/porgle/?w=pq=adduser

However, there is an adduser command in /usr/sbin which is
part of the FreeBSD base system.  If some script complains
about that command being missing, you should invstigate
whether you do have that command in /usr/sbin.

It's unlikely that a port requires a different command with
the same name without having a dependency on the port that
provides that command.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

C++: an octopus made by nailing extra legs onto a dog
-- Steve Taylor, 1998
___
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: How to find out which ports contains a specified command.

2009-04-06 Thread Peter Wang
Paul Schmehl pschmehl_li...@tx.rr.com writes:

yes, that's exactly what i want, thanks!

-peter

 --On April 5, 2009 6:13:57 PM -0400 ill...@gmail.com wrote:

 2009/4/5 Peter Wang peterw...@vip.qq.com:

 for example, after i installed pfsense, which is based on freebsd
 release 7.1, i found adduser command is missing.

 so how to find out which ports contains `adduser' command?
 thanks for your replies.


 % which adduser
 /usr/sbin/adduser

 Thus it is part of the base system, installed through /usr/src
 rather than /usr/ports.

 Also, as you are running (essentially) 7.x, this is probably
 better on freebsd-questions than current.

 I think you misunderstood his question.

 This would be one way to do it:

 find /usr/ports/ -type f -exec grep -sq adduser {} \; -print

 Paul Schmehl, If it isn't already
 obvious, my opinions are my own
 and not those of my employer.
 **
 WARNING: Check the headers before replying
___
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: How to find out which ports contains a specified command.

2009-04-06 Thread Peter Wang
Paul Schmehl pschmehl_li...@tx.rr.com writes:

yes, that's exactly what i want, thanks.
-peter
 --On April 5, 2009 6:13:57 PM -0400 ill...@gmail.com wrote:

 2009/4/5 Peter Wang peterw...@vip.qq.com:

 for example, after i installed pfsense, which is based on freebsd
 release 7.1, i found adduser command is missing.

 so how to find out which ports contains `adduser' command?
 thanks for your replies.


 % which adduser
 /usr/sbin/adduser

 Thus it is part of the base system, installed through /usr/src
 rather than /usr/ports.

 Also, as you are running (essentially) 7.x, this is probably
 better on freebsd-questions than current.

 I think you misunderstood his question.

 This would be one way to do it:

 find /usr/ports/ -type f -exec grep -sq adduser {} \; -print

 Paul Schmehl, If it isn't already
 obvious, my opinions are my own
 and not those of my employer.
 **
 WARNING: Check the headers before replying

 ___
 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

___
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: How to find out which ports contains a specified command.

2009-04-05 Thread ill...@gmail.com
2009/4/5 Peter Wang peterw...@vip.qq.com:

 for example, after i installed pfsense, which is based on freebsd
 release 7.1, i found adduser command is missing.

 so how to find out which ports contains `adduser' command?
 thanks for your replies.


% which adduser
/usr/sbin/adduser

Thus it is part of the base system, installed through /usr/src
rather than /usr/ports.

Also, as you are running (essentially) 7.x, this is probably
better on freebsd-questions than current.


-- 
--
___
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: How to find out which ports contains a specified command.

2009-04-05 Thread Paul Schmehl

--On April 5, 2009 6:13:57 PM -0400 ill...@gmail.com wrote:


2009/4/5 Peter Wang peterw...@vip.qq.com:


for example, after i installed pfsense, which is based on freebsd
release 7.1, i found adduser command is missing.

so how to find out which ports contains `adduser' command?
thanks for your replies.



% which adduser
/usr/sbin/adduser

Thus it is part of the base system, installed through /usr/src
rather than /usr/ports.

Also, as you are running (essentially) 7.x, this is probably
better on freebsd-questions than current.


I think you misunderstood his question.

This would be one way to do it:

find /usr/ports/ -type f -exec grep -sq adduser {} \; -print

Paul Schmehl, If it isn't already
obvious, my opinions are my own
and not those of my employer.
**
WARNING: Check the headers before replying

___
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