spam?

2011-03-13 Thread ajtiM
In the last week I got four emails like this one today:

From: a href=mailto:br...@cran.org.uk;br...@cran.org.uk/abr/
To: a href=mailto:per...@pluto.rain.com;per...@pluto.rain.com/abr/
CC: a href=mailto:free...@edvax.de;free...@edvax.de/a, a 
href=mailto:lum...@gmail.com;lum...@gmail.com/a, a href=mailto:freebsd-
questi...@freebsd.orgfreebsd-questions@freebsd.org


Your email was unable reach the intended person that you were sending it
to.
For more information on our business please click on the following link:
http://www.xpbargains.net;Click here for our

We look forward to your continued business in the future.
Regards
Webmaster

Thanks.

Mitja

http://jpgmag.com/people/lumiwa
___
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: spam?

2011-03-13 Thread Bruce Cran
On Sun, 2011-03-13 at 06:49 -0500, ajtiM wrote:
 In the last week I got four emails like this one today:
 
 From: a href=mailto:br...@cran.org.uk;br...@cran.org.uk/abr/
 To: a href=mailto:per...@pluto.rain.com;per...@pluto.rain.com/abr/
 CC: a href=mailto:free...@edvax.de;free...@edvax.de/a, a 
 href=mailto:lum...@gmail.com;lum...@gmail.com/a, a href=mailto:freebsd-
 questi...@freebsd.orgfreebsd-questions@freebsd.org

That's not from me - it's from a company called ParkLogic who are
forging emails.  See
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2010-12/msg00591.html 
for more details.

-- 
Bruce Cran

___
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: post-installation of CDDL files

2011-03-13 Thread Alexander Best
On Sat Mar 12 11, Rob Farmer wrote:
 On Sat, Mar 12, 2011 at 4:05 PM, Alexander Best arun...@freebsd.org wrote:
  hi there,
 
  my current world does not include any CDDL files, because i had WITHOUT_CDDL
  in my src.conf.
 
  now i'd like to build world with CDDL files (in order to use dtrace). what 
  are
  the necessary steps for doing so?
 
  i've removed the WITHOUT_CDDL part from my src.conf, but targets buildworld 
  and
  toolchain both fail:
 
  make: don't know how to make /usr/lib/libctf.a. Stop
 
  cheers.
  alex
 
  --
  a13x
  ___
  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
 
 
 Install it manually. Go to src/cddl/lib/libctf and
 make obj
 make depends
 make
 make install
 
 Then buildworld will work.

thanks a lot. that worked. :)

 
 -- 
 Rob Farmer

-- 
a13x
___
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


Upgrading FreeBSd when using a zfs-only installation?

2011-03-13 Thread Andrew Moran

Hallo,

I switched my system over to using a ZFS on root setup in 8.1. I want to 
upgrade it to 8.2.   

Is there any changes to the 
buildworld/buildkernel/installworld/installkernel/mergemaster routine?

The only thing I found via google was this:  
http://forum.nginx.org/read.php?23,178896,179074 And he does a mount -u 
./ and a zfs mount -a but it's not clear to me why he's doing that.

--Andy

___
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: Upgrading FreeBSd when using a zfs-only installation?

2011-03-13 Thread Sergiy Suprun
On Sun, Mar 13, 2011 at 17:40, Andrew Moran amo...@forsythia.net wrote:

 Hallo,

 I switched my system over to using a ZFS on root setup in 8.1.     I want to 
 upgrade it to 8.2.

 Is there any changes to the 
 buildworld/buildkernel/installworld/installkernel/mergemaster routine?

 The only thing I found via google was this:  
 http://forum.nginx.org/read.php?23,178896,179074     And he does a mount -u 
 ./ and a zfs mount -a but it's not clear to me why he's doing that.

 --Andy

 ___
 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


Hello Andy

Usually I use
zfs mount -a
to mount all and
zfs set readonly=off zpool/system
to take filesystem writable
___
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: Upgrading FreeBSd when using a zfs-only installation?

2011-03-13 Thread Randal L. Schwartz
 Andrew == Andrew Moran amo...@forsythia.net writes:

Andrew I switched my system over to using a ZFS on root setup in 8.1.
Andrew I want to upgrade it to 8.2.

Andrew Is there any changes to the
Andrew buildworld/buildkernel/installworld/installkernel/mergemaster
Andrew routine?

And for those of us using the binary upgrade, do I need to follow

  http://forums.freebsd.org/showpost.php?p=94557postcount=19

still?  Or do nothing?  Or do something else?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
___
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: Upgrading FreeBSd when using a zfs-only installation?

2011-03-13 Thread Adam Vande More
On Sun, Mar 13, 2011 at 11:57 AM, Randal L. Schwartz
mer...@stonehenge.comwrote:

  Andrew == Andrew Moran amo...@forsythia.net writes:

 Andrew I switched my system over to using a ZFS on root setup in 8.1.
 Andrew I want to upgrade it to 8.2.

 Andrew Is there any changes to the
 Andrew buildworld/buildkernel/installworld/installkernel/mergemaster
 Andrew routine?

 And for those of us using the binary upgrade, do I need to follow

  http://forums.freebsd.org/showpost.php?p=94557postcount=19

 still?  Or do nothing?  Or do something else?


Well those are his modified upgrade instructions, they seem relatively sound
but the extra steps aren't required.  The gpart stuff is to update the boot
loader which is only necessary if you upgrade the file system or pool eg
zfs/zpool upgrade.  You should probably run this just to prevent potential
severe pain later.

And as it's said, the nextboot is there because he's running a custom kernel
and wants to boot into GENERIC next time then later rebuilds his custom
kernel.

The short story is if you are running GENERIC anyway, a standard binary
upgrade would work fine, but if you have taken a divergent path you'll have
to account for those differences in your upgrade process.

-- 
Adam Vande More
___
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: Upgrading FreeBSd when using a zfs-only installation?

2011-03-13 Thread Randal L. Schwartz
 Adam == Adam Vande More amvandem...@gmail.com writes:

Adam On Sun, Mar 13, 2011 at 11:57 AM, Randal L. Schwartz
Adam mer...@stonehenge.comwrote:

 http://forums.freebsd.org/showpost.php?p=94557postcount=19

Adam Well those are his modified upgrade instructions, they seem
Adam relatively sound but the extra steps aren't required.  The gpart
Adam stuff is to update the boot loader which is only necessary if you
Adam upgrade the file system or pool eg zfs/zpool upgrade.  You should
Adam probably run this just to prevent potential severe pain later.

No, this was *absolutely* necessary for the 8.1 upgrade, because the
binary-installed boot loader was still ZFS ignorant.

I'm just asking if it's *still* necessary for 8.2.  Does the 8.2 boot
loader now know about ZFS if I install it from freebsd-update?

Keep in mind, I'm booting straight from ZFS.  There are no UFS
partitions on my disk.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
___
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: Upgrading FreeBSd when using a zfs-only installation?

2011-03-13 Thread Scott Ballantyne
On Sun, Mar 13, 2011 at 1:37 PM, Randal L. Schwartz
mer...@stonehenge.comwrote:

  Adam == Adam Vande More amvandem...@gmail.com writes:

 Adam On Sun, Mar 13, 2011 at 11:57 AM, Randal L. Schwartz
 Adam mer...@stonehenge.comwrote:

  http://forums.freebsd.org/showpost.php?p=94557postcount=19

 Adam Well those are his modified upgrade instructions, they seem
 Adam relatively sound but the extra steps aren't required.  The gpart
 Adam stuff is to update the boot loader which is only necessary if you
 Adam upgrade the file system or pool eg zfs/zpool upgrade.  You should
 Adam probably run this just to prevent potential severe pain later.

 No, this was *absolutely* necessary for the 8.1 upgrade, because the
 binary-installed boot loader was still ZFS ignorant.

 I'm just asking if it's *still* necessary for 8.2.  Does the 8.2 boot
 loader now know about ZFS if I install it from freebsd-update?

 Keep in mind, I'm booting straight from ZFS.  There are no UFS
 partitions on my disk.

 --
 Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
 0095
 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/
 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
 See http://methodsandmessages.posterous.com/ for Smalltalk discussion
 ___
 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


You need the new bootloader if you upgrade the zpool and zfs filesystems.
You'll get a message to that effect if you do that.
___
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: syslog-ng logging stopped

2011-03-13 Thread Len Conrad

May it be a permission issue (fs or /dev/kmem or the like)?

syslog-ng or syslogd as root doesn't enable log writing.

 Can you
manually start syslog-ng or syslogd with verbose flags enabled?

I edited rc.d/syslog-ng   script to add -d

of course, nothing is logged, so -d doesn't help.

Len



Man, you really stumbled upon something weird!

On 3/12/11, Len Conrad lcon...@go2france.com wrote:
 At 03:52 PM 3/12/2011, you wrote:
That probably means that it's not syslog-ng causing the problems.

 right

Maybe some firewall rule?

 I run pf.  pfctl -d didn't allow logging to start.  trafshow and tshark
 showed
 all the traffic hitting port 514, not being blocked.

 Len



 ___
 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



-- 
Iñigo Ortiz de Urbina Cazenave
http://www.twitter.com/ioc32



___
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: Upgrading FreeBSd when using a zfs-only installation?

2011-03-13 Thread Matthew Seaman
On 13/03/2011 17:37, Randal L. Schwartz wrote:
 Adam == Adam Vande More amvandem...@gmail.com writes:
 
 Adam On Sun, Mar 13, 2011 at 11:57 AM, Randal L. Schwartz
 Adam mer...@stonehenge.comwrote:
 
 http://forums.freebsd.org/showpost.php?p=94557postcount=19
 
 Adam Well those are his modified upgrade instructions, they seem
 Adam relatively sound but the extra steps aren't required.  The gpart
 Adam stuff is to update the boot loader which is only necessary if you
 Adam upgrade the file system or pool eg zfs/zpool upgrade.  You should
 Adam probably run this just to prevent potential severe pain later.
 
 No, this was *absolutely* necessary for the 8.1 upgrade, because the
 binary-installed boot loader was still ZFS ignorant.
 
 I'm just asking if it's *still* necessary for 8.2.  Does the 8.2 boot
 loader now know about ZFS if I install it from freebsd-update?
 
 Keep in mind, I'm booting straight from ZFS.  There are no UFS
 partitions on my disk.

A system update via freebsd-update or otherwise won't touch whatever
bootblocks you have installed.  So if you have already installed
gptzfsboot and your system already boots ZFS v12 then it will continue
to boot ZFS v12 without your touching anything to do with boot blocks.

However, with the 8.1 - 8.2 upgrade, you get (inter-alia) ZFS v13
support (I think it's v13 -- all my personal kit is running the stable/8
v28 patchset...) plus equivalent zpool version bump.  The 8.1 bootblocks
don't understand ZFS v13.  If you wish to update the on-disk formats of
your ZFS stuff: 'zpool upgrade -a' or 'zfs upgrade -a' then you *will*
need to reinstall the gptzfsboot boot-blocks.

You don't have to update the ZFS formats, but you'll miss out on various
performance and bug-fixes if you don't.

Given that the gptzfsboot boot blocks are backwards compatible to older
ZFS versions, highly recommended to update the boot blocks even if you
aren't intending to upgrade the ZFS bits just yet.  Just as an
anti-foot-shooting measure.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: Upgrading FreeBSd when using a zfs-only installation?

2011-03-13 Thread Randal L. Schwartz
 Daniel == Daniel Staal dst...@usa.net writes:

Daniel Nothing in the release notes appears to mention the bootloader and zfs
Daniel together, so I'd take the safe approach and assume it is still
Daniel necessary.

OK, so I'll appeal to the rest of freebsd-questions, since you can't
answer with authority:

can you upgrade from 8.1 to 8.2 using freebsd-update booting from
ZFS as described at http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/,
without having to go through the chicanry described at
http://forums.freebsd.org/showpost.php?p=94557postcount=19 - or is
there an updated version of that post, or should that post be
literally followed?

SOMEONE here knows.  Please help.

Otherwise, I have to build a VM system again with 8.1, just like I did
with 8.0, to figure out that 8.1 would NOT upgrade cleanly, and required
that extra step.

Please save me the trouble for 8.1 to 8.2.  I have four VPSs that need
to move from 8.1 to 8.2 remotely.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
___
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: Upgrading FreeBSd when using a zfs-only installation?

2011-03-13 Thread Andrew Moran
I have successfully upgraded form FreeBSD 8.1 to FreeBSD 8.2.  Here were my 
steps:

cvsup /root/stable-supfile 
cd /usr/src
make buildworld
make buildkernel
make installkernel
shutdown -r now 

*select single user mode*

mount -u /
zfs mount -a
mergemaster -p
make installworld
mergemaster

gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad4
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad5

zpool upgrade -a
zfs upgrade -a

shutdown -r now


NOTE 1:  the gpart commands are specific to my setup - I'm using a ZFS mirror 
on ad4 and ad5.Your system may be different.
NOTE 2:  my zfs upgrade -a ran out of swap space and died.  I ran zfs 
upgrade to see what filesystems were left un-upgraded and did those manually. 

Thanks Scott Ballantyne and everyone else who responded.  

Cheers!

--Andy

___
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


Shell script termination with exit function in backquotes

2011-03-13 Thread Maxim Khitrov
Hello everyone,

I might be doing something dumb here, but this doesn't make sense to
me. When I run the following script, I would expect to see no output:


#!/bin/sh

exit_prog()
{
echo -n 'before'
exit 0
echo -n 'after'
}

echo line 1: `exit_prog`
echo line 2:
echo line 3: `exit 1`
echo line 4:


The reason I expect to see no output is because 'exit 0' should be
called before any of the echo lines are allowed to execute. Instead,
what I get on FreeBSD 7  8 is:


line 1: before
line 2:


I don't understand this because 'exit 0' seems to terminate the call
to 'exit_prog', but the execution of the script continues. However,
when 'exit 1' is called, the script terminates before printing out the
last 2 lines.

It seems that 'exit' inside a function doesn't work when that function
is called with backquotes. I assume it has something to do with the
fact that commands in backquotes are executed in a sub-shell, but the
behavior is inconsistent.

When I run the same script on RHEL using bash, all 4 lines are printed:


line 1: before
line 2:
line 3:
line 4:


What's going on here?

- Max
___
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


Setting up Novatel Mifi 2200 on 8.2-REL

2011-03-13 Thread Ryan Coleman
Are you up to a challenge?

I have my Virgin Mobile MIFI 2200 connected to my new remote server via USB 
(8.2-RELEASE) that I just set up and it's not seeing the modem, but it does see 
the virtual drive on it.

dmesg output:
 ugen3.2: Novatel Wireless Inc. at usbus3
 ugen3.2: Novatel Wireless Inc. at usbus3 (disconnected)
 umass0: Novatel Wireless Inc. Novatel Wireless CDMA, class 0/0, rev 
 1.10/0.00, addr 5 on usbus0



 [root@camserve /usr/home/ryan]# more /var/log/messages | grep -i nova
 Mar 13 18:39:05 camserve kernel: ugen3.2: Novatel Wireless Inc. at usbus3
 Mar 13 18:39:05 camserve kernel: umass0: Novatel Wireless Inc. Novatel 
 Wireless CDMA, class 0/0, rev 1.10/0.00, addr 2 on usbus3
 Mar 13 18:39:07 camserve kernel: cd0: Novatel Mass Storage 1.00 Removable 
 CD-ROM SCSI-2 device 

also [more /var/log/messages | grep -i unknown]:
 Mar 13 18:39:05 camserve root: Unknown USB device: vendor 0x1410 product 
 0x5020 bus uhub3
 Mar 13 18:53:06 camserve root: Unknown USB device: vendor 0x1410 product 
 0x6000 bus uhub3
 Mar 13 19:07:10 camserve root: Unknown USB device: vendor 0x1410 product 
 0x6000 bus uhub3
 Mar 13 19:07:10 camserve root: Unknown USB device: vendor 0x1410 product 
 0x6000 bus uhub3
 Mar 13 19:37:09 camserve root: Unknown USB device: vendor 0x1410 product 
 0x5020 bus uhub0
 Mar 13 19:47:10 camserve root: Unknown USB device: vendor 0x1410 product 
 0x6000 bus uhub0

I have uhso installed but without the indentifcation of 1410:5020 but I cannot 
use it [yet] to connect to the net.

Any thoughts?

--
Ryan

___
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: Shell script termination with exit function in backquotes

2011-03-13 Thread Maxim Khitrov
On Sun, Mar 13, 2011 at 9:59 PM, Scott Ballantyne boyva...@gmail.com wrote:
 On Sun, Mar 13, 2011 at 8:26 PM, Maxim Khitrov m...@mxcrypt.com wrote:

 Hello everyone,

 I might be doing something dumb here, but this doesn't make sense to
 me. When I run the following script, I would expect to see no output:

 
 #!/bin/sh

 exit_prog()
 {
        echo -n 'before'
        exit 0
        echo -n 'after'
 }

 echo line 1: `exit_prog`
 echo line 2:
 echo line 3: `exit 1`
 echo line 4:
 

 The reason I expect to see no output is because 'exit 0' should be
 called before any of the echo lines are allowed to execute. Instead,
 what I get on FreeBSD 7  8 is:

 
 line 1: before
 line 2:
 

 I don't understand this because 'exit 0' seems to terminate the call
 to 'exit_prog', but the execution of the script continues. However,
 when 'exit 1' is called, the script terminates before printing out the
 last 2 lines.

 It seems that 'exit' inside a function doesn't work when that function
 is called with backquotes. I assume it has something to do with the
 fact that commands in backquotes are executed in a sub-shell, but the
 behavior is inconsistent.

 When I run the same script on RHEL using bash, all 4 lines are printed:

 
 line 1: before
 line 2:
 line 3:
 line 4:
 

 What's going on here?

 - Max

 Backquotes run the process in a sub process, that exits. and the original
 process continues.


Yes, my original expectation of having no output is incorrect, but
`exit 1` terminates the parent shell in FreeBSD. That's the source of
my confusion.

- Max
___
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


logging to dmesg from userland

2011-03-13 Thread perryh
I am looking for a way to write into the kernel message buffer --
the one that dmesg prints out -- from a userland program, to help
in relating kernel printf messages to the userland operations which
provoked them.  (Yes, I am aware of the potential DoS implications:
the capability should be restricted to root, or at least to the
operator group.  I expect to use it only in single-user mode.)

Is there a program, or a system call, which can do this?  logger(1)
seemed a likely prospect, but either it doesn't have this capability
or I haven't found the formula.
___
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: Shell script termination with exit function in backquotes

2011-03-13 Thread Devin Teske

On Mar 13, 2011, at 5:26 PM, Maxim Khitrov wrote:

 Hello everyone,
 
 I might be doing something dumb here, but this doesn't make sense to
 me. When I run the following script, I would expect to see no output:
 
 
 #!/bin/sh
 
 exit_prog()
 {
   echo -n 'before'
   exit 0
   echo -n 'after'
 }
 
 echo line 1: `exit_prog`
 echo line 2:
 echo line 3: `exit 1`

Replace with:

echo line 3: `( exit 1 )`

This executes the command within a sub-shell (preventing the exit call from 
effecting the current shell -- achieving what you desire).

 echo line 4:
 
 
 The reason I expect to see no output is because 'exit 0' should be
 called before any of the echo lines are allowed to execute. Instead,
 what I get on FreeBSD 7  8 is:
 
 
 line 1: before
 line 2:
 
 
 I don't understand this because 'exit 0' seems to terminate the call
 to 'exit_prog',

The function call is performed in a sub-shell (internally).


 but the execution of the script continues. However,
 when 'exit 1' is called, the script terminates before printing out the
 last 2 lines.
 
 It seems that 'exit' inside a function doesn't work when that function
 is called with backquotes. I assume it has something to do with the
 fact that commands in backquotes are executed in a sub-shell

That is incorrect. Here is a unit-test (to be performed on FreeBSD):

dteske@localhost ~ $ cat  EOF | /bin/sh -
 echo PS1=$PS1; : `unset PS1`; echo PS1=$PS1
 EOF
PS1=\[\e[32;1m\]\u@\H \[\e[34m\]\W \$\[\e[0m\]
PS1=

The above scriptlet does three things:

1. echo's the contents of the PS1 environment variable.
2. Executes unset PS1 within back-ticks.
3. re-echo's the contents of the PS1 environment variable.

Upon execution, we see that despite being executed within back-ticks, the PS1 
variable was wiped-out. If commands on FreeBSD under /bin/sh were executed 
within a sub-shell, said sub-shell would have a separate environment that 
wouldn't effect its parent. Contrast this behavior with the following scriptlet:

dteske@localhost ~ $ cat  EOF | /bin/sh -
 echo PS1=$PS1; : `(unset PS1)`; echo PS1=$PS1
 EOF
PS1=\[\e[32;1m\]\u@\H \[\e[34m\]\W \$\[\e[0m\]
PS1=\[\e[32;1m\]\u@\H \[\e[34m\]\W \$\[\e[0m\]

In the above, we've re-executed the same script but with one minor change -- 
we've placed the unset PS1 command within parentheses, which under FreeBSD's 
/bin/sh causes the creation of a sub-shell with separate environment and exit 
code, etc.

You can read more on FreeBSD by searching sh(1) for Grouping Commands 
Together.


 , but the
 behavior is inconsistent.
 
 When I run the same script on RHEL using bash, all 4 lines are printed:

If you make the changes that I've suggested, you'll have consistent execution. 
The reason you're having inconsistent behavior is because Linux has /bin/sh 
symbolically linked to /bin/bash while FreeBSD has a more traditional shell 
(we'll call it bourne shell plus).


 
 
 line 1: before
 line 2:
 line 3:
 line 4:
 
 
 What's going on here?
 
 - Max
 ___
 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

-- 
Cheers,
Devin Teske


- LEGAL DISCLAIMER -
This message  contains confidential  and proprietary  information
of the sender,  and is intended only for the person(s) to whom it
is addressed. Any use, distribution, copying or disclosure by any
other person  is strictly prohibited.  If you have  received this
message in error,  please notify  the e-mail sender  immediately,
and delete the original message without making a copy.

- FUN STUFF -
-BEGIN GEEK CODE BLOCK-
Version 3.12
GAT/CS/B/CC/E/IT/MC/M/MU/P/S/TW d+(++) s: a- C+++@$ UB$ P@$ L$ E-
W+++ N? o? K? w@ O M++$ V- PS+++ PE@ Y+ PGP- t(+) 5? X(+) R(-) tv+ b+++ DI+
D+(++) G++ e h r+++ z+++
--END GEEK CODE BLOCK--
http://www.geekcode.com/

- END TRANSMISSION -

___
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: spam?

2011-03-13 Thread Ian Smith
In freebsd-questions Digest, Vol 353, Issue 11, Message: 4
On Sun, 13 Mar 2011 11:57:03 + Bruce Cran br...@cran.org.uk wrote:
  On Sun, 2011-03-13 at 06:49 -0500, ajtiM wrote:
   In the last week I got four emails like this one today:
   
   From: a href=mailto:br...@cran.org.uk;br...@cran.org.uk/abr/
   To: a href=mailto:per...@pluto.rain.com;per...@pluto.rain.com/abr/
   CC: a href=mailto:free...@edvax.de;free...@edvax.de/a, a 
   href=mailto:lum...@gmail.com;lum...@gmail.com/a, a 
   href=mailto:freebsd-
   questi...@freebsd.orgfreebsd-questions@freebsd.org

[I guess it's a gmail option whether to quote messages with addresses 
shown as HTML urls?  Other people seem to be able to avoid doing that]

  That's not from me - it's from a company called ParkLogic who are
  forging emails.  See
  http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2010-12/msg00591.html
   for more details.

G'day Bruce,

unfortunately trying to follow that through by 'next in thread' on 
derkeiler.com lands at a message that they've censored, declaring:

 Error 410: The page you requested has been removed
 The page you requested has been removed due to inappropriate content.

From there, they leave you no way to finish the thread, in particular to 
my detailed wannabe FAQ - in reply to you, as it happened - on how folks 
might solve this issue at:

http://lists.freebsd.org/pipermail/freebsd-questions/2010-December/225226.html

That report may or may not help gmail users, as Chris Brennan reported 
gmail provides no way to filter on message headers such as Message-ID, 
still at least it shows how to determine that these messages are indeed 
forgeries.  Maybe by now parklogic realise that targetting gmail users 
will cause the most mischief?  Evil doesn't necessarily mean stupid ..

As for derkeiler.com's apparently arbitrary censorship, you can see the 
message they removed, two messages before mine by thread, here:

http://lists.freebsd.org/pipermail/freebsd-questions/2010-December/225236.html

Apart from charging Svein Skogen with 'signature too long' :) I can't 
imagine why they or their robot might have taken offense.  At least at 
lists.freebsd.org only something pretty extreme may provoke our esteemed 
postmaster into removing a message, and there's less obfuscation there 
of email addresses (like parklogic.com) .. for better or worse.

cheers, Ian
___
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


openldap 2.4.23 exited on signal 6

2011-03-13 Thread lyd mc
Hi all,

I am experiencing the same problem below. Do you have a solution for this? 

I am running on FreeBSD 8.1.

-
Hi list,
  I'm experiencing some problems with and LDAP box which used to run
  2.4.21 and has been upgraded to 2.4.22

The box act as a pam_ldap/nsswitch login server for a bunch of boxes,
let's say 20, and serve the mail server and web proxy server as a
user base.

The box has 2G of RAM and has an average load very low, let's say
top/systat shows 0.40.

The issue is that it happens from time to time every 2/4 days that the
slapd daemon exits
 on signal 6:

May 12 01:00:00 polido kernel: pid 27153 (slapd), uid 389: exited on
signal 6

Then i restart the process everything looks fine and no corruption
seems to happen in the DB. The box is a FreeBSD 8

Any clue is really appreciated.



Regards,

Alyd


  
___
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