Re: ZFS Boot Menu

2013-09-30 Thread Lars Engels

Am 28.09.2013 23:30, schrieb Teske, Devin:

In my recent interview on bsdnow.tv, I was pinged on BEs in Forth.

I'd like to revisit this.

Back on Sept 20th, 2012, I posted some pics demonstrating what
exactly code that was in HEAD (at the time) was/is capable of.

These three pictures (posted the same day) tell a story:
1. You boot to the menu: http://twitpic.com/b1eswi/full
2. You select option #5 to get here: http://twitpic.com/b1etyb/full
3. You select option #2 to get here: http://twitpic.com/b1ew47/full

I've just (today) uploaded the /boot/menu.rc file(s) that I used to 
create

those pictures:

http://druidbsd.cvs.sf.net/viewvc/druidbsd/zfsbeastie/

NB: There's a README file to go along with the files.

HINT: diff -pu menu.rc.1.current-head menu.rc.2.cycler
HINT: diff -pu menu.rc.1.current-head menu.rc.2.dynamic-submenu

Interested in feedback, but moreover I would like to see who is
interested in tackling this with me? I can't do it alone... I at least
need testers whom will provide feedback and edge-case testing.


Woohoo! Great! I am using ZFS boot environments with beadm, so I can 
test a bit.

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


Re: Discussing ideas or wish list

2013-08-08 Thread Lars Engels
On Thu, Aug 08, 2013 at 10:34:21AM -0500, Mark Felder wrote:
 
 I think systat is great, too. We could probably import some
 functionality from OpenBSD as I recall their systat has more features.

It depends. FreeBSD's systat has some features that OpenBSD's
doesn't have and vice versa (list take from the manpages):


FreeBSD:

icmpDisplay, in the lower window, statistics about messages
icmp6   This display is like the icmp display, but displays statis-
ip  Otherwise identical to the icmp display, except that it dis-
ip6 Like the ip display, except that it displays IPv6 statistics.
tcp Like icmp, but with TCP statistics.

OpenBSD:

buckets Display kernel malloc(9) bucket statistics similar to the
malloc  Display kernel malloc(9) type statistics similar to the
nfsclient   Display statistics about NFS client activity.  Output
nfsserver   Display statistics about NFS server activity.  Output
pf  Display filter information about pf(4), similar to the output
poolDisplay kernel pool(9) statistics similar to the output of
queues  Display statistics about the active altq(9) queues, similar
rules   Display pf rules statistics, similar to the output of pfctl
sensors Display the current values of available hardware sensors, in
states  Display pf states statistics, similar to the output of pfctl



pgpJtZh7gV2iW.pgp
Description: PGP signature


Re: Kernel dumps [was Re: possible changes from Panzura]

2013-07-11 Thread Lars Engels
On Wed, Jul 10, 2013 at 02:04:17PM -0600, asom...@gmail.com wrote:
 On Wed, Jul 10, 2013 at 12:57 PM, Jordan Hubbard j...@mail.turbofuzz.com 
 wrote:
 
  On Jul 10, 2013, at 11:16 AM, Julian Elischer jul...@elischer.org wrote:
 
  My first  candidates are:
 
  Those sound useful.   Just out of curiosity, however, since we're on
  the topic of kernel dumps:  Has anyone even looked into the notion
  of an emergency fall-back network stack to enable remote kernel
  panic (or system hang) debugging, the way OS X lets you do?  I can't
  tell you the number of times I've NMI'd a Mac and connected to it
  remotely in a scenario where everything was totally wedged and just
  a couple of minutes in kgdb (or now lldb) quickly showed that
  everything was waiting on a specific lock and the problem became
  manifestly clear.
 
  The feature also lets you scrape a panic'd machine with automation,
  running some kgdb scripts against it to glean useful information for
  later analysis vs having to have someone schlep the dump image
  manually to triage.  It's going to be damn hard to live without this
  now, and if someone else isn't working on it, that's good to know
  too!
 
 I don't doubt that it would be useful to have an emergency network
 stack.  But have you ever looked into debugging over firewire?  We've
 had success with it.  All of our development machines are connected to
 a single firewire bus.  When one panics, we can remotely debug it with
 both kdb and ddb.  It's not ethernet , but it's still much faster than
 a serial port.
 https://wiki.freebsd.org/DebugWithDcons

Debugging over Firewire may be very nice to use, but Firewire is dead
while every single device nowadays has a network interface, admittedly
it's often wireless.


pgp066mWac44G.pgp
Description: PGP signature


Re: GSOC: Qt front-ends

2013-04-25 Thread Lars Engels
On Thu, Apr 25, 2013 at 01:25:46AM -0700, Adrian Chadd wrote:
 .. or we could just bite the bullet and split GENERIC into GENERIC
 (which would have modules for everything) and GENERIC_NOMODULES.
 
 Then just populate a default module list that goes into /boot/loader.conf.

No, the list must be in kld_list= in rc.conf.
If you add all the modules to loader.conf you can drink a coffee while
the system boots.

 
 If you're even more evil, you could populate a module list that goes
 into /boot/kernel/module.conf.default, and then allow that to be
 overridden.
 
 Point is - a modular kernel works, right now. What we're missing is a
 way to load them at boot time by the bootloader. Well, enough of them
 to bring up the system so the rest can be autoloaded as needed.
 
 _That_ whole mess would be a great GSoC project.

+1


pgpuBzlZI_kIu.pgp
Description: PGP signature


Re: GSOC: Qt front-ends

2013-04-25 Thread Lars Engels
On Thu, Apr 25, 2013 at 01:57:50AM -0700, Adrian Chadd wrote:
 On 25 April 2013 01:38, Lars Engels l...@freebsd.org wrote:
  On Thu, Apr 25, 2013 at 01:25:46AM -0700, Adrian Chadd wrote:
  .. or we could just bite the bullet and split GENERIC into GENERIC
  (which would have modules for everything) and GENERIC_NOMODULES.
 
  Then just populate a default module list that goes into /boot/loader.conf.
 
  No, the list must be in kld_list= in rc.conf.
  If you add all the modules to loader.conf you can drink a coffee while
  the system boots.
 
 .. so improve loader so that doesn't suck so hard.

Sure, but the rc.conf solution is the lower hanging fruit. :)


pgpIszgWmzYJo.pgp
Description: PGP signature


Re: Fwd: GSOC: Qt front-ends

2013-04-24 Thread Lars Engels

Am 24.04.2013 13:44, schrieb Chris Rees:
On 24 Apr 2013 05:36, Justin Edward Muniz justin.mu...@maine.edu 
wrote:




Justin I say stick to  FreeBSD-update . My reason is, as Pkgng 
becomes

more popular , a front end for ports will be less useful as binary

packages

become more popular . Kports is a monster program , you should set a
reasonable goal ,and target dates; which may be hard with a cleanup

project
.   Also a update notifier for kde that handles FreeBSD update would 
be

very useful .

My 2cents .
---
Mark saad | mark.s...@longcount.org




Thank you very much Mark,

 I was definitely hoping to get community feedback on this, and I

value
you voicing your opinion. I agree that kports is a mammoth, and also 
that

a
system updater GUI should have a way to notify the user of new 
updates.


 Any other perspectives are welcome, as well as support for a
freebsd-update approach. I am working to refine my proposal, which as
you've pointed out is very important. Eventually I would like to help 
in
all three mentioned areas, but for now I must focus on one 
application.
Does anyone think that a custom kernel configuration and management 
GUI

utility would be desirable?

 I will shape my goals to meet the needs of the community.


Our kernel is actually very easy to configure, so I'm not convinced 
that
it's needed; you may be thinking of Linux's menuconfig, but I think 
that is

because of the complexity.



It _is_ easy. But having a nice graphical tool which draws a pretty 
table of
GENERIC and NOTES together with useful information about the possible 
options

and devices would be a handy thing to have IMHO.
Let's make FreeBSD userfriendly :-)
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: GSOC 2013 project Kernel Size Reduction for Embedded System

2013-04-12 Thread Lars Engels

Am 10.04.2013 15:27, schrieb Matthew Jacob:

On 4/9/2013 11:53 PM, Daniel Braniss wrote:
this host can run x11 apps! so 'Huge' is a relative matter, my first 
PDP11/45 has 64K :-) danny

Bah. Real old farts ran munix on a 32k PDP 11/03- shell and apps in
the low 16k and the kernel in the upper. Or was it the other way
around? At Tektronix, a PDP 11/70 supported 64 users runing vi and
compiling simultaneously, although starting a link job meant going out
for coffee.

As a point of comparison with huge and speed: in 1987 my Sun 3/50
with a 15MHz 68020 and 4MB of memory could open the mailtool and I
could be reading email within a second.

My current desktop with 8GB of memory and running 8 cores @ 2.2GHz
and Thunderbird running almost entirely memory before being
un-iconified still takes a couple of seconds to be usable.



That's why I use mutt. :-)
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Vice versa of 'pkg_info -W'

2013-01-04 Thread Lars Engels
On Thu, Jan 03, 2013 at 06:47:53PM +0100, rank1see...@gmail.com wrote:
  Am 02.01.2013 18:55, schrieb rank1see...@gmail.com:
   For example:
   # pkg_info -W /usr/local/bin/lynx
   /usr/local/bin/lynx was installed by package lynx-2.8.7.2,1
  
   # pkg_deinstall lynx-2.8.7.2,1
  
   # pkg_info -W /usr/local/bin/lynx
   pkg_info: /usr/local/bin/lynx: file cannot be found
  
  
   As you can figure it out, I want a reverse method, that is ...
   If I want to have '/usr/local/bin/lynx' installed, which port
   origin(s), would install it?
  
  
  
  I use porgle for that:
  
  http://www.secnetix.de/tools/porgle/porgle.py
 
 
 Search in: = checked all boxes
 
 0 results for:/usr/local/bin/lynx
 0 results for:bin/lynx
 
 No matching ports found.
 
 It doesn't work.
 

It does. Just use the filename, not the path:

http://www.secnetix.de/tools/porgle/porgle.py?plst=1q=tvbrowserSearch=Search



pgpB9UvGTktBZ.pgp
Description: PGP signature


Re: Vice versa of 'pkg_info -W'

2013-01-03 Thread Lars Engels

Am 02.01.2013 18:55, schrieb rank1see...@gmail.com:

For example:
# pkg_info -W /usr/local/bin/lynx
/usr/local/bin/lynx was installed by package lynx-2.8.7.2,1

# pkg_deinstall lynx-2.8.7.2,1

# pkg_info -W /usr/local/bin/lynx
pkg_info: /usr/local/bin/lynx: file cannot be found


As you can figure it out, I want a reverse method, that is ...
If I want to have '/usr/local/bin/lynx' installed, which port
origin(s), would install it?




I use porgle for that:

http://www.secnetix.de/tools/porgle/porgle.py


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


Re: Give users a hint when their locate database is too small.

2012-11-13 Thread Lars Engels
On Mon, Nov 12, 2012 at 10:07:16PM -0500, Eitan Adler wrote:
 What do people think of this? Maybe /usr/libexec/locate.updatedb is a
 better pointer?
 
 commit fb03b777daf2c69bb9612902e38fdb25b256be72
 Author: Eitan Adler li...@eitanadler.com
 Date:   Mon Nov 12 22:05:55 2012 -0500
 
 Give users a hint when their locate database is too small.
 
 Reviwed by:   ???
 Approved by:  ???
 MFC after:3 weeks
 
 diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c
 index b0faefb..f0c8c37 100644
 --- a/usr.bin/locate/locate/locate.c
 +++ b/usr.bin/locate/locate/locate.c
 @@ -292,7 +292,7 @@ search_mmap(db, s)
   err(1, `%s', db);
   len = sb.st_size;
   if (len  (2*NBG))
 - errx(1, database too small: %s, db);
 + errx(1, database too small: %s\nTry running
 /etc/periodic/weekly/310.locate, db);
 
   if ((p = mmap((caddr_t)0, (size_t)len,
 PROT_READ, MAP_SHARED,
 

Enlarge your  database! ;-)


pgpl0X7SYVAfj.pgp
Description: PGP signature


Re: FreeBSD on RaspberryPi

2012-11-07 Thread Lars Engels
On Wed, Nov 07, 2012 at 08:01:08AM -0800, Tim Kientzle wrote:
 WARNING:  This is still highly experimental and by no
 means ready for production use, but some folks might
 find it interesting.
 
 To boot FreeBSD on your RaspberryPi, you'll need:
   1) A RaspberryPi.
   2) A serial cable similar to this one:  www.adafruit.com/products/954
   3) An SD card of 2GB or larger
 
 Download this 111MB file (~1.6G uncompressed):
http://people.freebsd.org/~kientzle/FreeBSD-RPI-B-r242362-2012-10-30.img.xz
 
 Uncompress it, dd it onto your SD card, pop it in and apply power.
 (The serial cable above can also provide power; just leave the red
 lead disconnected until you get the SD card plugged in.)
 
 
 KNOWN BROKEN STUFF
 
   * There's no framebuffer/syscons yet.  Hence the need for a serial cable.
 
   * The memory is mis-probed (actually a boot loader problem,
  not a FreeBSD kernel issue), so you'll only get to use 128MB
  (you might be able to change this for a single boot by breaking
  into ubldr and editing the FDT by hand)
 
   * There has been NO attempt to reduce the footprint of this image.
 It's a completely stock build of FreeBSD-CURRENT.
 (Actually, I have turned off sendmail and a few other things in rc.conf,
 but compensated by building world with full debug enabled.)
 
   * I've personally not tried USB or Ethernet and have no idea if they work.

...

Are you aware of this?

http://kernelnomicon.org/?p=178


pgpIYllo1aWfj.pgp
Description: PGP signature


Re: FreeBSD in Google Code-In 2012? You can help too!

2012-10-24 Thread Lars Engels
On Tue, Oct 23, 2012 at 03:59:07PM -0400, Eitan Adler wrote:
 On 23 October 2012 12:54, David Magda dma...@ee.ryerson.ca wrote:
  On Tue, October 23, 2012 10:39, Fbsd8 wrote:
 
  The subject is Google Code-In and all the posted tasks are directed at
  creating documentation. Not one deals with coding any programs. If I was
  15-17 years old I sure would not be interested in writing documentation.
  I would want to use and develop my coding skills. To that end there a
  lot of simple PR's waiting for attention. This is an target area that
  young coders would find more interesting.
 
  It would depend on what one's interests were.
 
 Google code-in is aimed at *coders* and there is an expectation of
 people writing *code*.
 
 The biggest complaint for GCI last year was not enough coding tasks

What about creating a new port? That is some kind of coding. If we can
find some software that isn't ported, yet and not too hard to port (e.g.
the wanted ports page in the wiki) we could make a task proposal of it.
And one generic create a port for a piece of software that hasn't been
ported, yet.
Feel free to add me as a mentor for such a task.


pgpn6G92OORtB.pgp
Description: PGP signature


Re: Providing a default graphical environment on FreeBSD

2012-09-17 Thread Lars Engels
On Mon, Sep 17, 2012 at 11:00:21AM -0500, Zhihao Yuan wrote:
 On Mon, Sep 17, 2012 at 10:35 AM, Lorenzo Cogotti miciam...@hotmail.it 
 wrote:
  Hi,
  I was wondering about the possibility of FreeBSD to provide an official
  supported graphical environment.
 
  Currently FreeBSD doesn't provide any standard desktop environment, this
  means that, in a way much similar to Linux, a developer cannot know in
  advance which GUI will be available on the system. This leads to another
  problem, again much similar to Linux, tools are usually provided in a
  text based fashion only, because that's the only sure and reliable way a
  tool can work in a relatively dependency free and independent way. As
  another effect, many utilities and graphical tools are provided for a
  toolkit, but not for another, needlessly duplicating efforts and
  applications, achieving barely half the result.
 
  Though, in a different way than Linux, FreeBSD doesn't get much support
  from developers in this regard, mainly because development focuses over
  Linux rather than FreeBSD, which remains known only as a good and
  reliable server platform, many technologies remain relatively unknown
  and doesn't get attention from developers, like devd vs udev, and other
  solutions that FreeBSD provides since a very long time.
 
  The idea would be choosing a default desktop environment and providing
  it as the official supported way to develop GUI applications on FreeBSD,
  thus tools provided on FreeBSD would be able to get official GUIs and
  supported graphical tools in a standard and non-redundant fashion, like
  a GUI for tools like pkgng, geli(8), gpart(8). This choice would also be
  motivated by the fact that often technologies move toward Linux support,
  like GNOME3, dbus and consolekit, without taking into account BSD.
 
  In this regard CDE[1] is could be an interesting choice, since it was a
  diffuse and reliable UNIX environment, and it is lightweight, relatively
  Linux-like dependencies free solution, which could be updated to today
  standards and extended to support FreeBSD features.
  CDE was just recently released with open source license[2] and some
  effort is being made to support FreeBSD.
 
  Of course CDE isn't the only possibility, the idea is desktop
  environment agnostic, also I don't mean that FreeBSD shouldn't work
  with other environments, which could still be installed and used as long
  as they support the platform properly. I don't mean forcing a graphical
  environment over installed FreeBSD systems either, which could be
  unwanted for server installations.
 
  [1] http://sourceforge.net/p/cdesktopenv/wiki/Home/
  [2]
  https://sourceforge.net/p/cdesktopenv/code/ci/978aff3dc9c7d009423a3d7fd0624d12f9df0734/tree/cde/COPYING?format=raw
 
  I see this as an interesting opportunity to let FreeBSD gain more
  visibility in the desktop field, would this idea be useful and worth
  implementing?
 
  Thanks,
 
  --
  Lorenzo Cogotti
 
  ___
  freebsd-hackers@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
  To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
 
 I definitely agree with this. Sun has a book, UNIX Essentials
 featuring the Solaris..., and GUI takes a big part in the book. A
 default GUI is essential to a modern UNIX. FreeBSD can no longer
 regard GUI as a third-party bonus.

If you want a default GUI, install PC-BSD. It provides several graphical
management tools for FreeBSD.


pgprNYLJ8gMzZ.pgp
Description: PGP signature


Re: [maybe spam] Re: FreeBSD 1.x Binaries Work Except under Chroot

2012-08-16 Thread Lars Engels
On Wed, Aug 15, 2012 at 06:54:59PM +, Poul-Henning Kamp wrote:
 In message 
 CAJ-Vmo=yzcz_jdhtvq3kyhgxdnutvzqzpp+sdsz+zwe7cym...@mail.gmail.com
 , Adrian Chadd writes:
 Holy. Crap. 17 seconds?
 
 Can we please go back to having it take this long? please?
 
 386BSD was even better, and I have a machine that boots it in less
 than 15 seconds from power-on...

Me too, it's running Linux. ;-)




pgpiW2jpz9Wdm.pgp
Description: PGP signature


Re: FreeBSD Boot Times

2012-06-13 Thread Lars Engels
On Thu, Jun 14, 2012 at 07:13:23AM +0200, Hans Petter Selasky wrote:
 On Wednesday 13 June 2012 23:35:17 Mel Flynn wrote:
  On 13-6-2012 23:16, claudiu vasadi wrote:
   If you simplky do sysctl -d hw.usb.no_boot_wait you will see the
   explanation ;)
  
  Probably why Eitan asked as that description:
  a) means nothing to people unfamiliar with device enumerations
  b) does not point to a manual page that explains how USB does device
  enumerations and why it would account for a significant chunk of the
  boot process.
 
 It's not dangerous. It only means that you can't boot off a USB disk for 
 example, because the USB stack will then not wait for the BOOT device at 
 mount-root time, if you set this options. 

Can we disable that by default and add a boot menu entry like Boot from USB
Disk to enable it?


pgpPxWPragKoo.pgp
Description: PGP signature


Re: cleaning /usr/obj before copying it to USB key

2012-06-11 Thread Lars Engels
On Sun, Jun 10, 2012 at 01:07:58PM +0300, Aldis Berjoza wrote:
 On Sat, 9 Jun 2012 08:57:33 -0700
 Tim Kientzle t...@kientzle.com wrote:
 
  
  You can delete all of the '.o' files using a command like this:
  
 find /usr/obj -name '*.o' | xargs rm
  
 
 
 I think:
   find /usr/obj -name '*.o' -delete
 is much better

Or:
find /usr/obj -name '*.o' -exec rm {} \+



pgp8GkHn7TLql.pgp
Description: PGP signature


Re: boot menu option to disable graphics mode

2012-06-07 Thread Lars Engels
On Thu, Jun 07, 2012 at 10:45:26AM +0300, Andriy Gapon wrote:
 
 It's long been a wish of mine to have an ability to decide at boot time that a
 system should boot in console-only mode.  That is, that no graphics/X
 applications like e.g. xdm/kdm/gdm are automatically started even when they 
 are
 configured to do so.
 
 Here is my attempt at implementing that:
 https://gitorious.org/~avg/freebsd/avgbsd/commit/96f7051d63d4286ef6f0196d241e7855338a6ed7?format=patch
 
 All the option does at boot time is setting of 'inhibit_gui' variable for 
 kernel
 environment. 

I like this idea.

rc(8) sets rc_fast=yes when the system boots, so it would be possible
to extend the scripts that start a desktop manager can use a code like
this:

if [ -n $rc_fast -a `kenv inhibit_gui 2 /dev/null` = 1 ]; then
echo Console only mode, $name not started
exit 0
fi

Then the user can still start the DM manually by issuing
service $name start.




pgp6ER3Vv2RPM.pgp
Description: PGP signature


Re: Ways to promote FreeBSD?

2012-04-29 Thread Lars Engels
On Sat, Apr 28, 2012 at 09:08:18PM -0400, Mehmet Erol Sanliturk wrote:
 On Sat, Apr 28, 2012 at 11:24 PM, per...@pluto.rain.com wrote:
 
  Mehmet Erol Sanliturk m.e.sanlit...@gmail.com wrote:
   On Fri, Apr 27, 2012 at 8:06 PM, c.hutchins...@yahoo.com wrote:
I'm wondering if spinning up a live DVD desktop version, using
GENERIC, and/or Gnome/KDE might be a good option to take FreeBSD
for a test drive ...
  
   There is such a very nice distribution :
  
   http://ghostbsd.org/
 
  Also, freesbie.org
 
 
 The above link is not complete .
 The freesbie.org is working as follows :
 
 http://www.freesbie.org/
 
 
 Others :
 
 http://www.desktopbsd.net/
 
 
 There are some links in the page :
 
 http://www.livebsd.org/

FreesBIE and DesktopBSD are lng dead

Why don't we add a link to PC-BSD and maybe GhostBSD (though I read at
[1] that it needs to be polished more to be a user-friendly distro) to
the LATEST RELEASES section on freebsd.org?
That way we could promote FreeBSD on the desktop, have more people try
and run PC-BSD and keep simple how do I set up a desktop? questions
from freebsd-questions@ 

[1] http://www.linuxbsdos.com/2012/02/02/ghostbsd-2-5-review/


pgpdb5sB6rPW6.pgp
Description: PGP signature


Re: Ways to promote FreeBSD?

2012-04-29 Thread Lars Engels
On Sat, Apr 28, 2012 at 07:39:25AM +0200, Wojciech Puchar wrote:
  
  My opinion is that most important obstacle in front of FreeBSD is its 
  installation structure :
  
  
  It is NOT possible to install and use a FreeBSD distribution directly as it 
  is .
  
  In Linux distributions , when a distribution is installed , the user , NOT 
  root ,
  can use its facilities WITHOUT setting a ( large ) number of parameters 
  which it is approximately ZERO .
 
 why do you try to position this OS as windows/Mac OS replacement? Unix 
 will never be and is not designed for it, but for users that want to have 
 real control of computers.

Mac OSD _is_ a UNIX: http://www.linux-mag.com/id/4376
So, why not use a UNIX on the Desktop? :)


pgpDJ64oaHgwh.pgp
Description: PGP signature


Re: Never forget a special trick...

2012-03-05 Thread Lars Engels
On Sun, Mar 04, 2012 at 03:49:35PM -0500, Nate Dobbs wrote:
 On Sun, Mar 4, 2012 at 3:29 PM, Phillip Spring 
 gatinhodosseusson...@hotmail.com wrote:
 
 
  Dear anonymous open-source enthusiasts friends,
 
  How to echo a string backwards into a terminal?
  For example (or something like this):
 
  # echo @_foo_$
  oof
 
  Or it could be something else (that's because I forgot it):
 
  # echo $_bar_@
  rab
 
  Someone told me how to do it but I can't remember this trick.
  I just remember the date it happened: Oct-13-2011
 
  []'s
  Phillip.
   ___
  freebsd-hackers@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
  To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
 
 
 I'm not entirely sure how to do this in any arbitrary shell - although you
 could simply use the 'rev' command.
 
 %echo HELLO! | rev
 !OLLEH
 
 Here is a link to the man page:
 
 http://unixhelp.ed.ac.uk/CGI/man-cgi?rev

http://man.freebsd.org/rev  ;-)


pgpwjdj2N1bzs.pgp
Description: PGP signature


Re: devd based AUTOMOUNTER

2012-02-18 Thread Lars Engels
On Sat, Feb 18, 2012 at 06:06:23PM +0100, Uffe Jakobsen wrote:
 
 
 On 2012-02-18 14:09, Hans Petter Selasky wrote:
  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
 
  PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
  MNTPREFIX=/media
  LOG=/var/log/automount.log
  STATE=/var/run/automount.state
  DATEFMT=%Y-%m-%d %H:%M:%S
 
  __create_mount_point() { # /* 1=DEV */
 MNT=${MNTPREFIX}/$( basename ${1} )
 mkdir -p ${MNT}
  }
 
  __state_lock() {
 while [ -f ${STATE}.lock ]; do sleep 0.5; done
 
 :  ${STATE}.lock
 
  }
 
  __state_unlock() {
 rm ${STATE}.lock
  }
 
  __state_add() { # /* 1=DEV 2=PROVIDER 3=MNT */
 __state_lock
 grep -E ${3} ${STATE} 1  /dev/null 2  /dev/null  {
   __log ${1}:duplicated '${STATE}'
   return 1
 }
 echo ${1} ${2} ${3}  ${STATE}
 __state_unlock
  }
 
  __state_remove() { # /* 1=MNT 2=STATE 3=LINE */
 BSMNT=$( echo ${1} | sed 's/\//\\\//g' )
 sed -i '' /${BSMNT}\$/d ${2}
  }
 
  __log() { # /* @=MESSAGE */
 echo $( date +${DATEFMT} ) ${@}  ${LOG}
  }
 
  case ${2} in
 (attach)
   for I in /dev/${1}*
   do
 case $( file -L -s ${I} | sed -E 's/label:\ \.*\//g' ) in
   (*NTFS*)
 dd  ${I} count=1 2  /dev/null \
 
   | strings \
   | head -1 \
   | grep -q NTFS  {
 
 __create_mount_point ${I}
 which ntfs-3g 1  /dev/null 2  /dev/null  {
   ntfs-3g ${I} ${MNT} # /* sysutils/fusefs-ntfs */
 } || {
   mount_ntfs ${I} ${MNT}
 }
 __log ${I}:mount (ntfs)
 }
 ;;
   (*FAT*)
 dd  ${I} count=1 2  /dev/null \
 
   | strings \
   | grep -q FAT32  {
 
 __create_mount_point ${I}
 fsck_msdosfs -y ${I}
 mount_msdosfs -o large -l -L pl_PL.ISO8859-2 -D cp852 ${I}
  ${MNT} __log ${I}:mount (fat)
 }
 ;;
   (*ext2*)
 __create_mount_point ${I}
 fsck.ext2 -y ${I}
 mount -t ext2fs ${I} ${MNT}
 __log ${I}:mount (ext2)
 ;;
   (*ext3*)
 __create_mount_point ${I}
 fsck.ext3 -y ${I}
 mount -t ext2fs ${I} ${MNT}
 __log ${I}:mount (ext3)
 ;;
   (*ext4*)
 __create_mount_point ${I}
 fsck.ext4 -y ${I}
 ext4fuse ${I} ${MNT} # /* sysutils/fusefs-ext4fuse */
 __log ${I}:mount (ext4)
 ;;
   (*Unix\ Fast\ File*)
 __create_mount_point ${I}
 fsck_ufs -y ${I}
 mount ${I} ${MNT}
 __log ${I}:mount (ufs)
 ;;
   (*)
 case $( dd  ${I} count=1 2  /dev/null | strings | head -1 ) in
   (EXFAT)
 __create_mount_point ${I}
 mount.exfat ${I} ${MNT} # /* sysutils/fusefs-exfat */
 __log ${I}:mount (ufs)
 ;;
   (*) continue ;;
 esac
 ;;
 esac
 __state_add ${I} $( mount | grep -m 1  ${MNT}  | awk '{printf $1}'
  ) \ ${MNT} || continue
   done
   ;;
 
 (detach)
   MOUNT=$( mount )
   __state_lock
   grep ${1} ${STATE} \
 
 | while read DEV PROVIDER MNT
 
   do
 TARGET=$( echo ${MOUNT} | grep -E ^${PROVIDER}  | awk 
  '{print
  $3}' ) [ -z ${TARGET} ]  {
   __state_remove ${MNT} ${STATE} ${LINE}
   continue
 }
 umount -f ${TARGET}
 unset TARGET
 __state_remove ${MNT} ${STATE} ${LINE}
 __log ${DEV}:umount
   done
   __state_unlock
   __log /dev/${1}:detach
   find ${MNTPREFIX} -type d -empty -delete
   ;;
 
  esac
 
  Not sure if you've looked at disktype in sysutils
  but it may be useful to you.
 
 
  Hi,
 
  Should your script be written like an rc.d script, so that one can
  enable/disable this automounting from /etc/rc.conf?
 
 
 Nice,
 
 Some comments:
 
 Instead of requiring modification to /etc/devd.conf why not just put a 
 plugin conf-file in /etc/devd/ - well even better put in 
 /usr/local/etc/devd/ - that way your devd.conf modifications are not 
 lost upon patching/updating base os.
 
 There is an existing port called automounter by Dominic Fandrey  which 
 is much similar to your work.
 
 You can get inspired of how he places his devd.conf in /usr/local/etc/devd/
 His automounter also works with disk labels (as found in /dev/ufs/ and 
 /dev/msdosfs/ etc)
 
 You should consider make a port out of your work.

And please don't hardcode 

Re: Adventure into S3 state and back

2011-11-13 Thread Lars Engels
On Sat, Nov 12, 2011 at 03:41:49PM +0100, rank1see...@gmail.com wrote:
 - Original Message -
 From: YongHyeon PYUN pyu...@gmail.com
 To: rank1see...@gmail.com
 Cc: hack...@freebsd.org, freebsd-a...@freebsd.org
 Date: Fri, 11 Nov 2011 16:27:27 -0800
 Subject: Re: Adventure into S3 state and back
 
  On Thu, Nov 10, 2011 at 07:29:48PM +0100, rank1see...@gmail.com wrote:
   8.2-p4 RELEASE amd64
   
   I've built a custom kernel, only with drivers, that I need
   After resuming from S3 ...
   
   I hit:
   # ifconfig
   and all hells breaks loose:
   
   bge0: PHY read timed out (phy 1, reg 5, val 0x)
   bge0: PHY read timed out (phy 1, reg 10, val 0x)
   bge0: PHY read timed out (phy 1, reg 25, val 0x)
   media: Ethernet autoselect
   status: no carrier
   bge0: PHY read timed out (phy 1, reg 1, val 0x)
   bge0: PHY read timed out (phy 1, reg 1, val 0x)
   bge0: PHY read timed out (phy 1, reg 0, val 0x)
   ugen3.2: Logitech at usbus3 (disconnected)
   ukbd0: at uhub3, port 1, addr 2 (disconnected)
   ums0: at uhub3, port 1, addr 2 (disconnected)
   uhid0: at uhub3, port 1, addr 2 (disconnected)
   bge0: PHY read timed out (phy 1, reg 4, val 0x)
   ugen3.2: Logitech at usbus3
   ukbd0: Logitech USB Receiver, class 0/0, rev 2.00/12.01, addr 2 on 
 usbus3
   kbd2 at ukbd0
   ums0: Logitech USB Receiver, class 0/0, rev 2.00/12.01, addr 2 on 
 usbus3
   ums0: 16 buttons and [XYZT] coordinates ID=2
   uhid0: Logitech USB Receiver, class 0/0, rev 2.00/12.01, addr 2 on 
 usbus3
   bge0: PHY read timed out (phy 1, reg 5, val 0x)
   bge0: PHY read timed out (phy 1, reg 10, val 0x)
   bge0: PHY read timed out (phy 1, reg 25, val 0x)
   pflog0: flags=141UP,RUNNING,PROMISC metric 0 mtu 33152
   lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384
   options=3RXCSUM,TXCSUM
   inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
   inet6 ::1 prefixlen 128
   inet 127.0.0.1 netmask 0xff00
   nd6 options=3PERFORMNUD,ACCEPT_RTADV
   cruiser# ifconfig
   bge0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500
   
 options=8009bRXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE
   ether 00:21:70:70:01:df
   bge0: PHY read timed out (phy 1, reg 1, val 0x)
   bge0: PHY read timed out (phy 1, reg 1, val 0x)
   
   ... ... ... You get the point
  
  Known issue. kern/136876.
  Mobile bge(4) controllers seem to have this issue.
 
 I can see this has been reported, when 8.0-BETA1 was released.
 Now is almost 8.3 out and problem is still present
 
   
   
   So, taking into account:
   A common problem with suspend/resume is that many device drivers do 
 not save, restore, or reinitialize their firmware, registers, or device 
 memory properly.
   
   Next step was to get rid of 'bge' device from my KERNCONF and recompile 
 it.
   Voila! S3 works!
   
   But another, mouse problem, didn't go away!
   In 9 out of 10 cases, mouse doesn't resume.
   As it is USB mouse, I've did:
   
   # camcontrol rescan all
   didn't help
   
   I've also tried adding into loader.conf and nada:
   ---
   hint.psm.0.flags=0x3000
   ---
   But i think it is PS/2 related
   
   What works 100% for a mouse is to unplug and then plug back it's USB 
 receiver
   
   This is Dell D830 laptop
   
 
 How do I solve mouse issue?
 It is annoying to unplug and then plug back it's USB receiver, each time.

stop moused in rc.suspend and start it in rc.resume.


pgp7a56BFg98t.pgp
Description: PGP signature


Re: Adventure into S3 state and back

2011-11-13 Thread Lars Engels
On Sun, Nov 13, 2011 at 02:29:24PM +0100, rank1see...@gmail.com wrote:
 - Original Message -
 From: Lars Engels lars.eng...@0x20.net
 To: rank1see...@gmail.com
 Cc: pyu...@gmail.com, hack...@freebsd.org, freebsd-a...@freebsd.org
 Date: Sun, 13 Nov 2011 10:48:10 +0100
 Subject: Re: Adventure into S3 state and back
  
  stop moused in rc.suspend and start it in rc.resume.
  
 
 Thanks, but it isn't that.
 Even with it, mouse works on random, after resume from S3.
 
 But what I did figured out, looking kernel msgs on console, just after 
 resume, is that IF I see 1 of this:
 --
 uhub_reattach_port: port 1 reset failed, error=USB_ERR_TIMEOUT
 uhub_reattach_port: device problem (USB_ERR_TIMEOUT), disabling port 1
 --
 
 Mouse won't work unless I unplug/plug it's USB receiver
 

You might also build a trimmed down kernel without USB support compiled
in and use USB modules. Before suspending, unload them and re-load them
after waking up again. That used to work on my Thinkpad.


pgpvnEbtrQa6P.pgp
Description: PGP signature


Re: Porting FreeBSD to Raspberry Pi

2011-11-04 Thread Lars Engels
On Thu, Nov 03, 2011 at 03:58:02PM +0200, Aleksandr Rybalko wrote:
 On Thu, 3 Nov 2011 10:22:22 +0100
 Lars Engels lars.eng...@0x20.net wrote:
 
  Hi Hackers,
  
  maybe you've heard of the upcoming Raspberry Pi, a credit card sized
  ARM computer which is about to get sold for 25$ - 35$ from december
  on.
  
  http://www.raspberrypi.org/archives/302
  
  Hardware details: http://elinux.org/RaspberryPiBoard#Hardware_Details
  
  The first charge will be 10,000 pieces, so there's a fair chance that
  one can actually buy a board.
  
  If someone is willing to port FreeBSD to the Raspberry, I'd try to
  get one of the boards and send it to the porter.
  
  Cheers
  Lars
 
 Hi Lars,
 
 I seen info about Raspberry Pi, this is very nice hardware. It will be
 fun to port FreeBSD on it, since I already have experience with
 Broadcom SoC's. But device have undocumented parts, so writing driver
 for it maybe impossible or very hard (through a lot of RE).
 
 Anyway, it would be nice to play with it.

Okay, I will see what I can do to get one for you. If it's not possible
to port FreeBSD to it, it wouldn't be the end of the world. I just read
of the thingy and thought that it would be nice thing to have. :)


pgpx5xNAgvJ3h.pgp
Description: PGP signature


Porting FreeBSD to Raspberry Pi

2011-11-03 Thread Lars Engels
Hi Hackers,

maybe you've heard of the upcoming Raspberry Pi, a credit card sized ARM
computer which is about to get sold for 25$ - 35$ from december on.

http://www.raspberrypi.org/archives/302

Hardware details: http://elinux.org/RaspberryPiBoard#Hardware_Details

The first charge will be 10,000 pieces, so there's a fair chance that
one can actually buy a board.

If someone is willing to port FreeBSD to the Raspberry, I'd try to get
one of the boards and send it to the porter.

Cheers
Lars


pgp0yoirj9Zr4.pgp
Description: PGP signature


Re: Capsicum project: Ideas needed

2011-08-04 Thread Lars Engels

I just stumbled upon this rather outdated thread...

On Fri, 8 Jul 2011 15:09:52 +0400, Ilya Bakulin wrote:
[...]

wget
curl
links/lynx
This is Ports software, we may try to modify it and even send patches 
to
upstream, or maintain our local patches. I wanted to focus on base 
system
components during GSoC, but it doesn't hurt to try to capsicumize 
these

tools either.



fetch(1) is similar to wget and curl and is part of the base system, so 
would

this be a candidate?
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: [UPDATE] New Boot-Loader Menu -- version 1.4

2011-05-10 Thread Lars Engels
Kris Moore CC'ed


On Mon, May 09, 2011 at 10:41:40AM -0700, Devin Teske wrote:
  -Original Message-
  From: Lars Engels [mailto:lars.eng...@0x20.net]
  Sent: Monday, May 09, 2011 2:19 AM
  To: Devin Teske
  Cc: FreeBSD Hackers
  Subject: Re: [UPDATE] New Boot-Loader Menu -- version 1.4
  
  On Thu, May 05, 2011 at 01:20:43AM -0700, Devin Teske wrote:
   Hello fellow -hackers,
  
   I'm so very proud to offer the latest update to my new boot loader
   menu -- version 1.4 -- addressing ACPI detection, bringing it in-line
   with HEAD.
  
   It took some work and a few days, but I got it! Have a look below for
   six different displays (three different scenarios -- i386 w/ ACPI,
   i386 w/o ACPI, and non-i386 -- each in both BW and Color).
  
  
  Hi Devin,
  
  PC-BSD also has a slightly patched loader menu compared to the stock FreeBSD
  version.
 
 Does PC-BSD have CVSweb that I can browse? Link?

http://trac.pcbsd.org/browser/pcbsd/current/system-overlay/boot

 
  I.E. you can also set unset verbose mode and ACPI with it.
  Some days ago there was a proposal on a PC-BSD list to add an option to 
  boot a
  different kernel if one is found in /boot.
  Would it be possible to addi this function to your boot menu?
 
 No need. The basic constructs are there already, we just need to expand on 
 them.
 
 Here's how I've implemented a hard-coded list of kernels to choose from for 
 our systems (to be implemented in /boot/menu.rc):
 
 \ Set kernel paths (see menu_caption[2] below)
 set kernel_prefix=/kernels/
   \ NOTE: We like to keep our kernels in `/kernels'
 set kernel[0]=FIS-i386-8.1p1
 set kernel[1]=GENERIC-i386-8.1p1
 set kernel_suffix=.kgz
   \ NOTE: This is on our CD/DVD, so kernels are kgzip(8)'d
 
 \ Set default boot kernel
 set kernel=${kernel_prefix}${kernel[0]}${kernel_suffix}
 
 \ Initialize main menu constructs (variables are read by `menu.4th')
 
 set menu_caption[1]=Boot [ENTER]
 set menu_command[1]=boot
 
 set menu_caption[2][0]=Kernel: ${kernel[0]} (1of2)
 set menu_caption[2][1]=Kernel: ${kernel[1]} (2of2)
 set menu_caption[2]=${menu_caption[2][0]}
 set menu_command[2]=cycle_kernel
 
 \ ... rest of menu ...
 
 The magic is the cycle_kernel command (see `/boot/menu.4th'). The 
 `cycle_kernel' command is a wrapper to the `cycle_menuitem' command (similar 
 to how `toggle_verbose', `toggle_acpi', and `toggle_singleuser' are wrappers 
 to the `toggle_menuitem' command). Like the `toggle_menuitem' command, the 
 `cycle_menuitem' command uses a system of internal state variables to track 
 which menuitem text is to be displayed for that individual menuitem. Whereas 
 the `toggle_menuitem' command automatically toggles the text of a menuitem 
 between the `menu_caption[x]' and `toggled_text[x]' variables, the 
 `cycle_menuitem' command automatically cycles through the 
 `menu_caption[x][y]' variables, cycling back to y=0 when it gets to an 
 undefined `y' value.
 
 However, hard-coding an alternate kernel choice is something that I wouldn't 
 condone for an actual release. Instead, what I would recommend is to 
 dynamically allocate the kernel menu if/when multiple kernels are 
 discovered/configured. That's something that is currently not coded (dynamic 
 detection of kernels in /boot).
 
  Or even better
  work together with Kris Moore so we don't have two solutions for the same 
  task?
 
 I'd like to open a discussion with Kris Moore on how we could go about 
 detecting additional kernels.
 
 Off the top of my head, here's a couple thoughts:
 
 a. We could test a battery of different kernel names (kernel, kernel.bak, 
 kernel.orig, etc.)
 b. We could allow the user to set kernel1, kernel2, kernel3, etc. in 
 loader.conf(5)
 c. We could allow the user to set kernel=kernel1;kernel2;kernel3;... in 
 loader.conf(5)
 d. Some combination of the above.
 -- 
 Devin
 
 P.S. I think it'd also be nice to someday offer the user a choice of booting 
 into a memory filesystem for rescue purposes. We've offered this to our users 
 for years with the following configuration:
 
 set root[0]=
 set root[1]=rescue_mfsroot
 set menu_caption[7][0]=Root Image: Default (1of2)
 set menu_caption[7][1]=Root Image: Rescue (2of2)
 set menu_caption[7]=${menu_caption[7][0]}
 set menu_command[7]=cycle_root
 

Good idea! :-)


pgpRnhpUhwmGX.pgp
Description: PGP signature


Re: [UPDATE] New Boot-Loader Menu -- version 1.4

2011-05-09 Thread Lars Engels
On Thu, May 05, 2011 at 01:20:43AM -0700, Devin Teske wrote:
 Hello fellow -hackers,
 
 I'm so very proud to offer the latest update to my new boot loader
 menu -- version 1.4 -- addressing ACPI detection, bringing it in-line
 with HEAD.
 
 It took some work and a few days, but I got it! Have a look below for
 six different displays (three different scenarios -- i386 w/ ACPI,
 i386 w/o ACPI, and non-i386 -- each in both BW and Color).
 

Hi Devin,

PC-BSD also has a slightly patched loader menu compared to the stock
FreeBSD version. I.E. you can also set unset verbose mode and ACPI with
it.
Some days ago there was a proposal on a PC-BSD list to add an option to
boot a different kernel if one is found in /boot.
Would it be possible to addi this function to your boot menu? Or even
better work together with Kris Moore so we don't have two solutions for
the same task?

Lars


pgpTDrYVktqJU.pgp
Description: PGP signature


Re: State of FreeBSD/xbox

2011-04-03 Thread Lars Engels
On Sun, Apr 03, 2011 at 10:26:18PM +0300, Kostik Belousov wrote:
 On Sun, Apr 03, 2011 at 07:40:14PM +0100, Chris Rees wrote:
  Hi all,
  
  I've got an xbox running at my parents' house as a backup MX, among
  other things.
  
  Ages ago I updated it from 7.2 - 8.1, and I ended up with no end of
  trouble, and finished by restoring a backup. I emailed rink@, although
  he replied it appears a case of ENOTIME.
  
  Am I the last person on the planet running FreeBSD on an Xbox? I'm
  planning on hacking around a bit to see if I can fix it next week, but
  I was wondering if anyone else had similar ideas or a solution!
  
  In short-- FreeBSD/xbox is bitrotted (or so it appears!)
 
 I wanted to remove XBOX for long time. With the introduction of Xen PV,
 i386/machdep.c became too convoluted. On the other hand, if you can
 bring it back to life, I definitely would not have an argument for removal.

Maybe Ed (CC'ed) can help you?


pgpvaksjJpgpp.pgp
Description: PGP signature


Re: [PATCH] Add HISTORY to strlen(3) and strstr(3) man pages

2010-12-06 Thread Lars Engels
On Sat, Dec 04, 2010 at 06:00:02PM +0200, Marin Atanasov Nikolov wrote:
 On Sat, Dec 4, 2010 at 1:38 PM, Matthias Andree matthias.and...@gmx.de 
 wrote:
  Am 04.12.2010 12:33, schrieb Marin Atanasov Nikolov:
  Hello,
 
  Could someone review the attached patches and possibly commit them?
 
  The patches add HISTORY for the strstr(), strnstr(), strlen() and
  strnlen() functions.
 
  Thanks,
  Marin
 
  I find it hard to believe the versions especially for strstr and strlen.
 
 You are so right about that :)
 
 That must be one those copy-paste mistakes :)
 
 I've attached the new patches.
 
 Regards,
 Marin

It should be FreeBSD 8.0 not 8.0 like in the other manpages.


pgpIYxyExyNRp.pgp
Description: PGP signature


Re: [PATCH] Add HISTORY to strlen(3) and strstr(3) man pages

2010-12-06 Thread Lars Engels
On Mon, Dec 06, 2010 at 10:31:28AM +0200, Marin Atanasov Nikolov wrote:
 On Mon, Dec 6, 2010 at 9:33 AM, Lars Engels lars.eng...@0x20.net wrote:
  On Sat, Dec 04, 2010 at 06:00:02PM +0200, Marin Atanasov Nikolov wrote:
  On Sat, Dec 4, 2010 at 1:38 PM, Matthias Andree matthias.and...@gmx.de 
  wrote:
   Am 04.12.2010 12:33, schrieb Marin Atanasov Nikolov:
   Hello,
  
   Could someone review the attached patches and possibly commit them?
  
   The patches add HISTORY for the strstr(), strnstr(), strlen() and
   strnlen() functions.
  
   Thanks,
   Marin
  
   I find it hard to believe the versions especially for strstr and strlen.
 
  You are so right about that :)
 
  That must be one those copy-paste mistakes :)
 
  I've attached the new patches.
 
  Regards,
  Marin
 
 
 Hi,
 
  It should be FreeBSD 8.0 not 8.0 like in the other manpages.
 
 
 .Fx is a FreeBSD macro, so .Fx 8.0 . is FreeBSD 8.0.
 
 Or I have misunderstood something?
 
 Regards,
 Marin

Uh, yes. Sorry. :)


pgpS2dtHPX8cm.pgp
Description: PGP signature


Re: sched_autogroup_enabled

2010-11-25 Thread Lars Engels
On Wed, Nov 24, 2010 at 11:02:26PM +0100, Ulrich Spörlein wrote:
 On Thu, 18.11.2010 at 21:51:52 +0100, Harald Servat wrote:
  Alexander ( rest of the list),
  
-performance has a thread about this topic. If you're interested, you can
  take a look there. Here's the URL
  
  http://lists.freebsd.org/pipermail/freebsd-performance/2010-November/004067.html
 
 I'm not subscribed there, but I had to laugh real hard, when I saw the
 hype this generated on slashdot the other day. Why? Cause I'm doing
 similiar stuff on FreeBSD for ages and it is perfectly snappy. Everytime
 I sit down in front of an Ubuntu box, I'm amazed at how crappy the
 responsiveness is.
 
 Might also be related to me not using Gnome ... *shrug*
 
 Just did some more tests, running 2x 720p videos, make -j32 buildkernel,
 the chromium port was building a while now in the background, firefox
 and opera running with quite a number of tabs (and opera seems to have
 developed a cpu leak recently, as it constantly sucks up ~25% CPU).
 Anyway, I cannot notice any UI hiccups or mouse stuttering or problems
 when redrawing windows.
 
 Am I doing it wrong?

No. You are using FreeBSD.


pgphYvRQgRmOs.pgp
Description: PGP signature


Re: Remove printf in acpi_tz_sanity()

2010-11-22 Thread Lars Engels
On Sun, Nov 21, 2010 at 10:18:13PM -0200, Carlos A. M. dos Santos wrote:
 On Sun, Nov 21, 2010 at 9:18 PM, Paul B Mahol one...@gmail.com wrote:
  On Sun, Nov 21, 2010 at 9:17 PM, Andriy Gapon a...@freebsd.org wrote:
  on 21/11/2010 13:07 Paul B Mahol said the following:
  This patch removes printf which spams console whenever thermal state
  is changed in laptop. Source of problem is in buggy BIOS.
 
  diff --git a/sys/dev/acpica/acpi_thermal.c b/sys/dev/acpica/acpi_thermal.c
  index 515a742..00866b2 100644
  --- a/sys/dev/acpica/acpi_thermal.c
  +++ b/sys/dev/acpica/acpi_thermal.c
  @@ -697,11 +697,8 @@ acpi_tz_getparam(struct acpi_tz_softc *sc, char
  *node, int *data)
   static void
   acpi_tz_sanity(struct acpi_tz_softc *sc, int *val, char *what)
   {
  -    if (*val != -1  (*val  TZ_ZEROC || *val  TZ_ZEROC + 2000)) {
  -     device_printf(sc-tz_dev, %s value is absurd, ignored (%d.%dC)\n,
  -                   what, TZ_KELVTOC(*val));
  +    if (*val != -1  (*val  TZ_ZEROC || *val  TZ_ZEROC + 2000))
        *val = -1;
  -    }
   }
 
  As is - this is a perfect candidate for a local only patch.
  To be included into the tree - this, most probably, has to be controlled 
  by a
  tunable/sysctl.
 
  So solution for useless console spamming is to add useless sysctl.
 
  For -1 values, sane default values should be picked up.
  Anyway only _CRT is showing on console, and _PSV  _HOT are both -1 for tz0.
 
  I'm not first one mentioning this and issue is old several years.
 
 +1 (Compaq nx6320)

Yes, almost every HP notebook seems to report -1 every few seconds.


pgp85SFuxNQ4v.pgp
Description: PGP signature


Re: little mistake in rc.subr?

2010-09-27 Thread Lars Engels
On Mon, Sep 27, 2010 at 03:04:21PM +0400, Dmitry Banshchikov wrote:
 Hello,
 
 In /etc/rc.subr, at line 231, there is:
 
 if [ ! -f $_pidfile ]; then
 debug pid file ($_pidfile): not readable.
 return
 fi
 
 Is check [ ! -r $_pidfile ] more correct?

There's pratically no difference. rc stuff is run as root, so if there's
a file, it's readable, if there's no file, then the debug message is
printed.


pgpUhLAiLPo78.pgp
Description: PGP signature


Re: A simple and hopefully usable FreeBSD live CD

2010-08-23 Thread Lars Engels

Quoting Ed Schouten e...@80386.nl:


Hello all,

A couple of major releases ago, we had a FreeBSD disc1.iso which also
included the livefs. Nowadays the livefs comes on a separate disc. This
livefs disc has a couple of issues in my opinion:

- The livefs disc does not feature any installsets, which means if your
  system has 1 CD-ROM drive, you have to resort to network connectivity
  to obtain the installsets to perform a manual install.

- The livefs installation places everything in /dist and does some odd
  tricks to get the basic things working, which means that any tool that
  assumes a specific pathname doesn't work anymore. I remember the GEOM
  tools were once broken because of this. You also have to add symlinks
  here and there to make something as simple as scp(1) work, because the
  ssh(1) binary is in the wrong place.

I think I already mentioned it on some of the lists, but I've spent some
time creating a better FreeBSD live CD (or at least I tried to).
Basically the CD is just a stock FreeBSD installation (base + manpages +
kernel) with a small mfsroot between the boot process to let it use
unionfs and tmpfs before calling into /sbin/init.

You can just run adduser, dhclient and fire up a SSH daemon. It's
exactly the same as an installation of FreeBSD on a harddisk, with the
only exception that any changes don't survive a reboot. It also has a
copy of all the installsets, which means you can do installations and
recoveries.

I've attached a copy of the script I use to generate the CD. Just make
sure you have FreeBSD-9.0-CURRENT-201008-amd64-disc1.iso placed in the
same directory as the script and that you have an up-to-date HEAD source
tree in /usr/src, with a GENERIC kernel already built. You also need to
have cdrtools installed. After that, you should be able to run gencd.sh
as root (needed for retaining file permissions), which should generate a
FreeBSD-9.0-CURRENT-201008-amd64-ed.iso.

Right now it still requires the source tree, because the fixes for tmpfs
needed to make it all work aren't in the 201008 snapshot. By the time
201009 is released, the script can easily be modified to use the kernel
binaries.

I'm sending this email for two different reasons:

1. Be sure to give the CD a try and share your experiences. Does it
   work? Does it crash? Is it usable for you? If not, why not?

2. Would a CD like this be a good addition to the provided install
   media? Does it actually solve shortcomings of the existing media?

If people think it's a nice CD to work with, I could consider
integrating it into release(7). Thanks!

--
 Ed Schouten e...@80386.nl
 WWW: http://80386.nl/



Hi Ed,

could you please upload the resulting ISO so that people who don't  
want to create it themselves can test your CD?


TIA

Lars


--
Lars Engels
E-Mail: lars.eng...@0x20.net


pgpTPsw0849RV.pgp
Description: PGP Digital Signature


Re: regenerating /var/db/pkg

2010-04-22 Thread Lars Engels
On Thu, Apr 22, 2010 at 03:21:16PM +0300, Eitan Adler wrote:
 
  Just asking opinions, if people want this, I'll make a patch and
  file a PR.
 
 
 Is this script correct?
 
 #!/bin/sh
 #
 # $FreeBSD: src/etc/periodic/daily/210.backup-aliases,v 1.6.36.1.2.1
 2009/10/25 01:10:29 kensmith Exp $
 #
 
 # If there is a global system configuration file, suck it in.
 #
 if [ -r /etc/defaults/periodic.conf ]
 then
 . /etc/defaults/periodic.conf
 source_periodic_confs
 fi
 
 bak=/var/backups
 db_loc=/var/db/pkg;
 bk_loc=/$bak/pkgdb.bak.tar
 
 case $daily_backup_pkgdb_enable in
 [Yy][Ee][Ss])
   if [ ! -d $db_loc ]
   then
   echo '$daily_backup_pkgdb_enable is enabled but' \
   $db_loc doesn't exist
   rc=2
   else
   rc=0
 
   echo 
   echo Backing up mail aliases:
 
   if [ ! -f $bk_loc ]
   then
   echo no $bk_loc
   tar -cjf $bk_loc $db_loc || rc=3
   fi
   fi;;
 
 *)  rc=0;;
 esac
 
 exit $rc

Hmm, I guess you shouldn't backup /var/foo to /var/bar. If /var is lost,
your backup is gone, too.


pgpP1ekZ55zoj.pgp
Description: PGP signature


Re: Looking for a mentor

2010-03-22 Thread Lars Engels
On Sun, Mar 21, 2010 at 09:33:04PM -0700, Guillermo Amaral wrote:
 Hi FreeBSDers,
 
 I'm a  C and C++ developer and I am looking for anybody would be
 willing to help me get started in the FreeBSD development community.
 :D
 
 I'm trying to get more experience in both kernel and user-land
 development on FreeBSD. I won't take much of your time, I really need
 somebody to assign stuff to me and give me a few hints when I get
 lost. It would be awesome if we can start from simple tasks and move
 up to other more complex tasks so I can get a feel of how much time I
 can dedicate to this on a week without loosing my job. LOL
 
 I have been looking for a mentor in FreeBSD for a little while by
 asking around but I think I need to get a few more eye balls so I can
 really get into the project on the development side and not just on
 the publicity side as I have been doing so far.
 
 Thanks in advance  ;)

Guillermo,

please take a look at http://www.freebsd.org/projects/ideas/ideas.html
there are some project Ideas together with mentors who can get you into
details.

Lars


pgpW7WS8cN9YG.pgp
Description: PGP signature


Re: [RFC] [patch] pkill verbose option

2010-02-04 Thread Lars Engels
On Thu, Feb 04, 2010 at 12:01:26PM +0200, Eitan Adler wrote:
 This patch hijacks pgrep's -l
 

I'd like to paint the bikeshed with little -p's ;-)


pgpnxCW9VgVDg.pgp
Description: PGP signature


Re: pam_passwdqc update to latest vendor release

2009-12-17 Thread Lars Engels
On Thu, Dec 17, 2009 at 11:15:30AM +0200, Leonidas Tsampros wrote:
 Hello,
 
 I read a mail on this list 3 or 4 weeks saying/stating that pam_passwdqc
 was out of date. To update the module I used the vendor release 1.0.5
 which can be found here
 
 http://www.openwall.com/pam/modules/pam_passwdqc/pam_passwdqc-1.0.5.tar.gz
 
 The patch is available here:
 
 http://bifteki.podzone.org/~ltsampros/pam_passwdc.diff
 
 And a summary of the patch:
 
 M   contrib/pam_modules/pam_passwdqc/INTERNALS
 M   contrib/pam_modules/pam_passwdqc/LICENSE
 M   contrib/pam_modules/pam_passwdqc/Makefile
 M   contrib/pam_modules/pam_passwdqc/PLATFORMS
 M   contrib/pam_modules/pam_passwdqc/README
 M   contrib/pam_modules/pam_passwdqc/pam_macros.h
 M   contrib/pam_modules/pam_passwdqc/pam_passwdqc.c
 A   contrib/pam_modules/pam_passwdqc/pam_passwdqc.map
 M   contrib/pam_modules/pam_passwdqc/pam_passwdqc.spec
 M   contrib/pam_modules/pam_passwdqc/passwdqc.h
 M   contrib/pam_modules/pam_passwdqc/passwdqc_check.c
 M   contrib/pam_modules/pam_passwdqc/passwdqc_random.c
 M   lib/libpam/modules/pam_passwdqc/pam_passwdqc.8
 
 I built the updated module on my system. I did some testing with the
 default options in /etc/pam.d/passwd and it seems to work okey.
 
 Feedback is welcome.


Thanks for updating pam_passwdqc. I couldn't find the time to update it
myself.

It works for me, though the patch doesn't apply cleanly:

Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|diff --git a/lib/libpam/modules/pam_passwdqc/pam_passwdqc.8 
b/lib/libpam/modules/pam_passwdqc/pam_passwdqc.8
|index 408f77d..8247652 100644
|--- a/lib/libpam/modules/pam_passwdqc/pam_passwdqc.8
|+++ b/lib/libpam/modules/pam_passwdqc/pam_passwdqc.8
--
Patching file lib/libpam/modules/pam_passwdqc/pam_passwdqc.8 using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 failed at 32.
Hunk #3 succeeded at 53.
Hunk #4 succeeded at 67.
Hunk #5 succeeded at 80.
Hunk #6 succeeded at 98.
Hunk #7 succeeded at 128.
Hunk #8 succeeded at 144.
Hunk #9 succeeded at 173.
Hunk #10 succeeded at 191.
Hunk #11 succeeded at 233.
Hunk #12 succeeded at 257.
1 out of 12 hunks failed--saving rejects to 
lib/libpam/modules/pam_passwdqc/pam_passwdqc.8.rej
done


Could someone commit this, please?


Lars


pgpGPSr9xRWs9.pgp
Description: PGP signature


Re: unit testing automated password assignment

2009-11-18 Thread Lars Engels

Quoting Boris Kochergin sp...@acm.poly.edu:


Aryeh Friedman wrote:

I have a script that automatically creates a user and sets their password:

echo $3 | sudo pw useradd $1 -m -c $2 -s tcsh -h0

and by my employer's policy I need to unit test... my question is
how... the checking for user existence and such is easy but how do I
test that the password is correct?


And if you want to enforce strong passwords, take a look at pam_passwdqc(8).


--
Lars Engels
E-Mail: lars.eng...@0x20.net


pgpaXVQsALRJG.pgp
Description: PGP Digital Signature


Re: unit testing automated password assignment

2009-11-18 Thread Lars Engels

Quoting Dag-Erling Smørgrav d...@des.no:


Lars Engels lars.eng...@0x20.net writes:

And if you want to enforce strong passwords, take a look at pam_passwdqc(8).


Or don't, it's waaay out of date.  I should import a newer version, just
never got around to it.  Patches are welcome.



Yes, today I was looking for the sources to use on Solaris and I saw  
that there was some activity in during the last months.


OTOH the module in our base is still working. I successfully it last week.


pgpQXxDX7yisp.pgp
Description: PGP Digital Signature


Re: Make process title - % complete

2009-10-20 Thread Lars Engels

Quoting Alex Kozlov s...@rm-rf.kiev.ua:


On Mon, Oct 19, 2009 at 05:51:42PM +0200, Ivan Voras wrote:

2009/10/19 Alex Kozlov s...@rm-rf.kiev.ua:
 On Mon, Oct 19, 2009 at 04:35:08PM +0200, Ivan Voras wrote:
  if nobody objects, I'll commit it :)
 
  I seem to recall that setproctitle() is quite expensive to   
call; perhaps
  it would make sense offer a flag to prevent make(1) from   
calling it? [1]

 
  Anyway, the feature looks nice! I'd like to have it...
 
  [1] I'm unsure how expensive it is compared to fork(1)-ing etc; I'd
 expect it's negligable but who knows...

 The loop it's called in is not processed bazillion times per second
 (though it *is* called surprisingly often; small, fast jobs can result
 in somewhere in the order of magnitude of 100 iterations per second on
 a fast CPU). As you said - I expect it's negligable compared to fork()
 and the work jobs themselves do.
 How about add this statistic to make info handler?
You mean SIGINFO?

Yes


Using SIGINFO sounds nice, but make produces so much output that  
normally you won't see the result because it is scrolled up just after  
sending the signal.


pgp3asCWYW1Au.pgp
Description: PGP Digital Signature


Re: small usr.bin/find patch

2009-06-24 Thread Lars Engels

Quoting Alexander Best alexbes...@math.uni-muenster.de:


hmmm...but dd e.g. uses lowercase instead of upercase letters to indicate
kilobyte, megabyte and so on. isn't there some unix/posix/whatever standard
telling app developers what to use?



Actually thats only BSD's dd. GNU dd only accepts uppercase letters.


pgpDWwEavbioX.pgp
Description: PGP Digital Signature


Re: concurrent sysctl implementation

2009-05-09 Thread Lars Engels
On Fri, May 08, 2009 at 11:41:17PM +0200, Ed Schouten wrote:
 Hi,
 
 * vasanth raonaik vasanth.raon...@gmail.com wrote:
  Hello Jt,
  
  I am a newbee in this alias. I am having a very basic question. It would be
  really good if you could give me some of this information.
  Could you please elaborate on what is the current architecture of sysctl
  implementation and How the concurrency would benefit us.
 
 Right now sysctl is synchronized using the sysctl lock. The problem is
 that certain sysctls just block for a very long time (especially some of
 the GEOM ones). We also call sysctl when we execute new processes, to
 obtain a random number for the stack protector. This means we have quite
 a lot of contention on it. This lock needs to be there, because sysctls
 can be added and removed on demand.

Why is sysctl used to get a random number? Can't we get a different
source for it?


pgpy3bE29OnYg.pgp
Description: PGP signature


Re: Linux setpci equivalent in FreeBSD?

2009-04-16 Thread Lars Engels

Quoting Zahemszky Gábor ga...@zahemszky.hu:


Hi!

I'v found (well, mav@ found it) on a wiki page  (*) a trick to use some
TI sdhci cards. They use the setpci command, to set some bits in the HW.
Are there any tool under FreeBSD to do the same?

Thanks,

Gábor at Zahemszky dot HU

(*) http://www.gentoo-wiki.info/Acer_Ferrari_4005WLMi#SDHCI



You can use pciconf like this:

pciconf -wb pci0:30:0 0x1a 9

(but don't just copy  paste this, it might hurt your hardware ;-) )


pgpBgRDtR0LVQ.pgp
Description: PGP Digital Signature


Re: Small change to wc

2008-12-16 Thread Lars Engels
On Sat, Dec 06, 2008 at 09:25:05PM +0200, Giorgos Keramidas wrote:
 On Sat, 06 Dec 2008 17:40:14 +0200, Giorgos Keramidas 
 keram...@ceid.upatras.gr wrote:
  The updated patch, and a manpage change to document the new option is
  attached below.  Konstantin, if you like this version of the patch,
  I'll commit it to /head and schedule an MFC after a week or so.
 
 Committed to /head as change 185714:
 
 http://svn.freebsd.org/viewvc/base?view=revisionrevision=185714
 
 Sheldon, thanks for the patch.  I will merge it to the stable branches
 after about a few days :-)

Yay, now we can add it to 7.1 release notes just like sun had df now
supports -h when Solaris 10 came out. ;-)


pgpgncITtEL9L.pgp
Description: PGP signature


Re: Is there virtualbox ports?

2008-10-31 Thread Lars Engels

Quoting Boern [EMAIL PROTECTED]:


Hi,all:
   I am ready to intall sun xVM VirtualBox on my FreeBSD7.0,but have no
found in the ports,anybody can help me?



VirtualBox doesn't work on FreeBSD...


pgpOXLlePpZcx.pgp
Description: Digitale PGP-Unterschrift


Re: SSH Brute Force attempts

2008-09-30 Thread Lars Engels

Quoting Rich Healey [EMAIL PROTECTED]:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Recently I'm getting a lot of brute force attempts on my server, in the
past I've used various tips and tricks with linux boxes but many of them
were fairly linux specific.

What do you BSD guys use for this purpose?

If this belongs on -security let me know and I'll ask over there.



Just do not use password authentication but public key authentication  
and a reasonable passphrase on it.


pgpGp7TV3Xdt6.pgp
Description: Digitale PGP-Unterschrift


Re: USB Video class

2008-09-01 Thread Lars Engels
On Tue, Aug 19, 2008 at 05:53:32PM +0200, Alexander Leidinger wrote:
 Quoting Peter B [EMAIL PROTECTED] (from Tue, 19 Aug 2008 15:05:29 +0200 
 (MEST)):
 
 
 Is there any ongoing project towards USB Video class support in FreeBSD ..?
 
 This is better asked on usb@ (CCed). I'm not aware of such an effort, feel 
 free to start it (you better wait some days until the 
 new USB stack hits CVS).

NetBSD had a Summer of Code project and it seems to be pretty
successful:
http://netbsd-soc.sourceforge.net/projects/uvc/
Perhaps one can take this as a starting point?



pgphkDOXky1cZ.pgp
Description: PGP signature


Re: Idea for FreeBSD

2008-08-07 Thread Lars Engels
On Wed, Aug 06, 2008 at 11:16:36PM -0700, Tim Kientzle wrote:
 The Solaris smf tools provide some nice facilities: one is single
 interface to start, stop, check and restart all the services on a
 system. We pretty much have that ...
 The other is a single interface to enable, disable and query the
 status of all the services. All we really have is the last one...
 
 Sounds like the only missing pieces, then, are standard
 ways to enable, disable, and configure services.  How about:
 
   sudo /etc/rc.d/ssh enable
   sudo /etc/rc.d/ssh disable
   sudo /etc/rc.d/ssh configure
 
 That shouldn't be much of a stretch to implement, either.
 The first two just append entries to /etc/rc.conf.  The
 third opens an editor with a list of variables supported
 by this service and then appends the result to rc.conf.

Pretty much the same came to my mind some weeks ago.
I'd propose a rcadm command like Solaris' svcadm, so you do not need
to care about if the rc script is in /etc/rc.d or in
/usr/local/etc/rc.d.
And it would be safer to check if the service is already listed in
rc.conf, so it doesn't get appended every time  you enable a service.


pgp4PjNWFD9J7.pgp
Description: PGP signature