Re: Intel D525MW board No ethernet devices detected with 9.1 Release

2013-01-08 Thread PseudoCylon
> Message: 17
> Date: Sat, 5 Jan 2013 20:44:15 -0600
> From: iamatt 
> To: freebsd-questions@freebsd.org
> Subject: Intel D525MW board No ethernet devices detected with 9.1
> Release
> Message-ID:
> 
> Content-Type: text/plain; charset=UTF-8
>
> Hello,
>
> I have an intel D525MW board with an ATOM processor.  The system was
> running 9.0 RELEASE amd64 with no problems.  I did an binary upgrade
> to 9.1 amd64 and now the onboard ethernet card is not detected.  I
> encountered a similar issue when I tried to go from 9.0 RELEASE to 9.0
> STABLE a while back.

The onboard NIC is working fine with 9.0-STABLE fetched on June 16,
right at this moment. (I'm sending this e-mail with D525MW.) So, one
possibility is r237797.
http://svnweb.freebsd.org/base/release/9.1.0/sys/dev/pci/pci_pci.c?view=log#rev237797


Additional info:
9.1-RELEASE worked fine on another ATOM based board, D945GCLF2. Fresh
install from memstick, I was able to fetch complete src tree, and
other config files without any problem. (Now it is running CURRENT,
though.)

Also, 9.1-RELEASE + re(4) is working fine on a laptop with a core2 duo.


AK
___
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: AARGH... give me some idea for ad-blockers

2013-01-08 Thread Harald Weis
On Sun, Jan 06, 2013 at 07:40:37PM -0800, Gary Kline wrote:
 > 
 > 
 >  itHOught I'd ask the best list which ad-blocking software I should
 >  use.
 > 
 >  firefox is my std browsers; also use ixquick.
 > 
 >  thanks for some tips,

Have a look at midori.
-- 
Harald Weis
___
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"


Help to understand the behaviour of TCP-Cubic module in FreeBSD

2013-01-08 Thread Debojyoti Roy
Hi Everyone,

I am trying to develop TCP-CUBIC and using Free-BSD as a standard device
for testing.


To load the Cubic module in FreeBSD the following commands were executed :

kldload ./cc_cubic.ko
sysctl -w net.inet.tcp.cc.algorithm=cubic

The test method has been attached which was used to understand the
behaviour of TCP-Cubic.

There are few questions regarding the behaviour of FreeBSD.

Q1) After receiving Full Acknowledgement from the receiver, sender entered
into Congestion Avoidance State. At that moment filghtsize was equal to 0
and CWND became 1. Now, sender will increase its CWND according to CUBIC
algorithm but FreeBSD follows Slow Start Algorithm by incrementing CWND
from 1 --> 2 --> 4 segments. As per my understanding, if FreeBSD follows
TCP-Cubic functionality, it should be in TCP friendly region. So, CWND
should be 7 in next RTT. Calculation has been provided below :

*W_tcp(t) = W_Max * (1 - beta) + 3 * beta/(2 - beta) * t/RTT*

*=> W_tcp(t) = 7 *

*[W_Max = 8, congestion occurs = 18.874sec , current time = 18.878sec,
therefore elapsed time t = 0.004 sec, RTT = (18.878 - 18.876) = 0.002 sec,
beta = 0.2]*
But I find that it incremented to 2 rather than 7.

Could you please explain this behaviour ?

Q2) If my tool acknowledges all the packets coming from FreeBSD after Fast
Retransmit, the segment sequence was 1 --> 2 --> 4 --> 5 --> 6 --> 7 --> 8
--> 6 --> 6 --> 6... Why after sending 8 segments in congestion avoidance
state, CWND unexpectedly sets to 6 ?

Q3) What will be the unit of t and RTT (i.e seconds or miliseconds) ?

Q4) In Cubic-draft both concave and convex use the same formula. Only
difference in convex it depends on max_increment_rate. How does
max_increment_rate variable can be calculated ?

If I have any wrong understanding please rectify me and I will be very
grateful if you could answer the questions as soon as possible.

Thanks in advance,
Debojyoti Roy
The following method has been used to test the Cubic in congestion avoidance 
state : 

+
| Test  Action in   

|
| Step No.  the step
Comments
|
+
|1  RECEIVER sends SYN packet   
Connection Estublishment
|
|2  FreeBSD sends SYN-ACK packet

|
|3  RECEIVER sends ACK packet   

|
+---+
|4  FreeBSD sends 4 segments
From here we can infer that initial window size is 4. So, CWND = 4  
|
+---+
|5  RECEIVER sends ACK for all 4 segments   
FreeBSD will follow the Slow Start Algorithm. Hence it should make CWND = 2 x 4 
= 8 |
+---+
|6  FreeBSD sends 8 segments

|
+---+
|7  RECEIVER sends 3-Duplicate ACKs of last segment of step 5   
FreeBSD realises the Congestion has occured 
|
+---+
|8  FreeBSD retransmits the lost segment
FreeBSD in Fast Retransmit state
|
+

Re: Bash history empty on login

2013-01-08 Thread Dimitri Yioulos
On Monday 07 January 2013 7:01:09 pm Andre Goree wrote:
> I'm not sure what's going on, as I've never had an issue
> like this in my years of using FreeBSD nor Linux.  Each
> time I login, my history file is empty!  I'm not sure
> what could be causing this, but below [1] is my .bashrc. 
> I had ". ~/.bashrc" in ~/.profile, but I removed it while
> I'm trying to troubleshoot this issue.  Does anyone have
> an idea or a direction to point me in?  Thanks in
> advance.
>
> [1]#
> # ~/.bashrc
> #
>
> # If not running interactively, don't do anything
> [[ $- != *i* ]] && return
>
> #PS1='[\u@\h \W]\$ '
>
> alias ls='ls -G'
> alias ll='ls -lAhp'
> alias umount='sudo umount'
> alias grep='grep --color'
> alias nmap='sudo nmap'
> alias updatedb='sudo updatedb'
> alias pkg_add='sudo pkg_add'
> alias pkg_delete='sudo pkg_delete'
> alias top='top -aPStzj -s 1'
> alias portinstall='sudo portinstall'
> alias updatedb='sudo updatedb'
>
> PS1='\[\e[1;37m\][\u@\h \W]\$\[\e[0m\] '
>
> export PATH=$PATH:/home/agoree/bin:/usr/local/kde4/bin/
>
> #BASH history
> export HISTTIMEFORMAT="%h/%d - %H:%M:%S "
> export HISTFILESIZE=10
> #export VBOX_USB=usbfs
>
> --

Hope I'm not offending you if the following are things 
you've tried as a matter-of-course:

After booting up, is history started, or do you have to do 
that manually?  Have you run "set -o" to see if history is 
enabled?  If it isn't, then "set -o history".  Is a "clear" 
command being issued from anywhere upon logout or reboot?

Just some thoughts.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


mtree spec

2013-01-08 Thread Fbsd8

I have this mtree specification file

/set type=dir uname=root gname=wheel
.
etc
..
root
..
usr
local
etc
..
..
..
..

But I want to have it behave a little differently.
What I am after is etc has to be present and any sub-directories off of 
etc is not a error. Same thing for for root and usr/local/etc


Can I do it using the nlink option on the etc level above or use some 
flag on mtree -d command I feed the above specification file to?

___
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: sendmail not working

2013-01-08 Thread Robert Huff

On 1/7/2013 11:48 PM, Gary Aitken wrote:

On 01/07/13 19:45, Robert Huff wrote:



 I have compiled sendmail following the instructions in the cyrus-sasl port.
 Sendmail starts, but no mail is processed either way.  /var/log/maillog 
has this:


Jan  7 21:07:42 jerusalem sm-mta[69792]: r05KsfdB048780: forward 
/home/huff/.forward: Group writable directory
Jan  7 21:07:42 jerusalem sm-mta[69792]: r05KsfdB048780: smtpquit: mailer local 
exited with exit value 1
Jan  7 21:07:42 jerusalem sm-mta[69792]: r05KsfdB048780: to=, 
delay=2+05:11:25, xdelay=00:00:00, mailer=local, pri=52831038, relay=local, 
dsn=4.4.2, stat=Deferred: Connection reset by local

 The sendmail.cf and submit.cf are attached.

 Any idea what I've screwed up, or my next step in finding out?


No clue, except the first message might be saying it's not going to honor 
anything
from .forward because it's in a group writable directory which would be 
considered
a security issue.  Try making /home/huff group read only?


Done.
Restarted sendmail (all parts).
Still no mail processed.


Robert Huff


___
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: mtree spec

2013-01-08 Thread Robert Bonomi
> From owner-freebsd-questi...@freebsd.org  Tue Jan  8 07:35:39 2013
> Date: Tue, 08 Jan 2013 08:32:17 -0500
> From: Fbsd8 
> To: FreeBSD questions 
> Subject: mtree spec
>
> I have this mtree specification file
>
> /set type=dir uname=root gname=wheel
> .
> etc
> ..
> root
> ..
> usr
> local
> etc
> ..
> ..
> ..
> ..
>
> But I want to have it behave a little differently.
> What I am after is etc has to be present and any sub-directories off of 
> etc is not a error. Same thing for for root and usr/local/etc
>

The answers to those issues are found in 'man mtree'.

IOW, RTFM applies.

___
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: mtree spec

2013-01-08 Thread Fbsd8

Robert Bonomi wrote:

From owner-freebsd-questi...@freebsd.org  Tue Jan  8 07:35:39 2013
Date: Tue, 08 Jan 2013 08:32:17 -0500
From: Fbsd8 
To: FreeBSD questions 
Subject: mtree spec

I have this mtree specification file

/set type=dir uname=root gname=wheel
.
etc
..
root
..
usr
local
etc
..
..
..
..

But I want to have it behave a little differently.
What I am after is etc has to be present and any sub-directories off of 
etc is not a error. Same thing for for root and usr/local/etc




The answers to those issues are found in 'man mtree'.

IOW, RTFM applies.




What you think I got this far without reading the manual.
If I had greater understanding what the manual was saying
I would not be asking for help.

___
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: sendmail not working

2013-01-08 Thread weldon

On 08.01.2013 07:39, Robert Huff wrote:

On 1/7/2013 11:48 PM, Gary Aitken wrote:

On 01/07/13 19:45, Robert Huff wrote:


 I have compiled sendmail following the instructions in the 
cyrus-sasl port.
 Sendmail starts, but no mail is processed either way.  
/var/log/maillog has this:



Jan  7 21:07:42 jerusalem sm-mta[69792]: r05KsfdB048780: forward 
/home/huff/.forward: Group writable directory
Jan  7 21:07:42 jerusalem sm-mta[69792]: r05KsfdB048780: smtpquit: 
mailer local exited with exit value 1
Jan  7 21:07:42 jerusalem sm-mta[69792]: r05KsfdB048780: 
to=, delay=2+05:11:25, xdelay=00:00:00, mailer=local, 
pri=52831038, relay=local, dsn=4.4.2, stat=Deferred: Connection reset 
by local


 The sendmail.cf and submit.cf are attached.

 Any idea what I've screwed up, or my next step in finding out?


No clue, except the first message might be saying it's not going to 
honor anything
from .forward because it's in a group writable directory which would 
be considered

a security issue.  Try making /home/huff group read only?


Done.
Restarted sendmail (all parts).
Still no mail processed.




Are you forwarding to an email address (full address with @ sign or 
just a local account)?
If to a local account, is this account new (no email ever)?  If so, 
what is the mode of the directory in which local mbox's are stored?

___
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: Bash history empty on login

2013-01-08 Thread Andre Goree
On Tue, 08 Jan 2013 07:59:51 -0500, Dimitri Yioulos  
 wrote:




Hope I'm not offending you if the following are things
you've tried as a matter-of-course:

After booting up, is history started, or do you have to do
that manually?  Have you run "set -o" to see if history is
enabled?  If it isn't, then "set -o history".  Is a "clear"
command being issued from anywhere upon logout or reboot?

Just some thoughts.



No offense at all, thanks for your suggestions!  I'm currently at work so  
I'll test this when I get home (this is on a desktop running 8.3-stable).   
I've never had to do anything special when using bash on FreeBSD.  I'll be  
sure to check th output of "set -o" and report back here.


If there's an erroneous 'clear' command somewhere, it must be on logout  
since I can easily test this problem being that I use tmux.  :)  I also do  
not have a .bash_logout file, if that matters.


Thanks for the suggestions, I'll let you know what turns up.

--
Andre Goree
an...@drenet.info
___
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: Bash history empty on login

2013-01-08 Thread Trond Endrestøl
On Tue, 8 Jan 2013 09:05-0500, Andre Goree wrote:

> On Tue, 08 Jan 2013 07:59:51 -0500, Dimitri Yioulos 
> wrote:
> 
> > 
> > Hope I'm not offending you if the following are things
> > you've tried as a matter-of-course:
> > 
> > After booting up, is history started, or do you have to do
> > that manually?  Have you run "set -o" to see if history is
> > enabled?  If it isn't, then "set -o history".  Is a "clear"
> > command being issued from anywhere upon logout or reboot?
> > 
> > Just some thoughts.
> > 
> 
> No offense at all, thanks for your suggestions!  I'm currently at work so I'll
> test this when I get home (this is on a desktop running 8.3-stable).  I've
> never had to do anything special when using bash on FreeBSD.  I'll be sure to
> check th output of "set -o" and report back here.
> 
> If there's an erroneous 'clear' command somewhere, it must be on logout since
> I can easily test this problem being that I use tmux.  :)  I also do not have
> a .bash_logout file, if that matters.
> 
> Thanks for the suggestions, I'll let you know what turns up.

What are the permissions of ~/.bash_history?

Usually they are set to 0600 in octal due to security concerns and 
rightfully so. Could they be (re)set to 0400 or even ?

-- 
+---++
| Vennlig hilsen,   | Best regards,  |
| Trond Endrestøl,  | Trond Endrestøl,   |
| IT-ansvarlig, | System administrator,  |
| Fagskolen Innlandet,  | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,   | Cellular...: +47 952 62 567,   |
| sentralbord 61 14 54 00.  | Switchboard: +47 61 14 54 00.  |
+---++___
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: sendmail not working

2013-01-08 Thread Robert Bonomi
> From owner-freebsd-questi...@freebsd.org  Tue Jan  8 07:43:00 2013
> Date: Tue, 08 Jan 2013 08:39:39 -0500
> From: Robert Huff 
> To: freebsd-questions@freebsd.org, free...@dreamchaser.org,
>  Robert Huff 
> Subject: Re: sendmail not working
>
> On 1/7/2013 11:48 PM, Gary Aitken wrote:
> > On 01/07/13 19:45, Robert Huff wrote:
>
> >>  I have compiled sendmail following the instructions in the 
> >>  cyrus-sasl port. Sendmail starts, but no mail is processed either 
> >>  way.  /var/log/maillog has this:
> >
> > No clue, except the first message might be saying it's not going to 
> > honor anything from .forward because it's in a group writable directory 
> > which would be considered a security issue.  Try making /home/huff 
> > group read only?
>
>  Done. Restarted sendmail (all parts). Still no mail processed.

"It is a well-known fact that one horse can run faster than another. But
_which_ horse?  Details are IMPORTANT!"

WHAT HAPPENS when you -try- to send an email _out_?  
Do you get an error email?
Does it show in the outbound mail queue?
   (if it's in the queue, look at the qf* file, to see why it is deferred.)
What do the sendmail log messages say?

WHAT HAPPENS when  somebody -tries- to send an email _in_ from somewhere else?
Do  they get an error email?
Does it show in their outbound mail queue?
What do your sendmail log messages say?

WHAT HAPPENS when you 'telnet' to your mailserver port(s) and try doing smtp
  transaction(s) manually?
___
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: 9.1 won't install - GEOM/GRAID issues

2013-01-08 Thread Mike.
On 1/2/2013 at 12:11 PM Fbsd8 wrote:

|Michael Powell wrote:
|> Mike. wrote:
|> [snip]
|>> Thanks for the reply.   The disk in question has never been used
for
|>> RAID, so if there is RAID metadata on the disk, I do not know how
it
|>> got there.  The disk is (I believe --- it's been a while since I
have
|>> been inside that box) on a Promise SATA RAID controller, but RAID
is
|>> not used and has never been used (I have a 3Ware controller for
RAID on
|>> that box).
|>>
|>> When things settle down, I'll try to figure out how to sanitize the
|>> disk and try to install 9.1 again.
|>>
|> 
|> If somehow some RAID controller ever wrote out metadata to the disk
it
|will 
|> be the last sector or two at the very end. Sometimes some GPT
|partitioning 
|> schemes corrupt this too. If some alien form of GPT partitioning or
some 
|> form of RAID has written anything to this area it will throw an
error
|when 
|> GEOM 'tastes' the disk. 
|> 
|> You can zero both these areas with dd if=/dev/zero plus disk plus
some 
|> arithmetic. Another way, and I do sometimes when I go to reuse a
disk
|that's 
|> been used for a while, is to use the mfr's diagnostic utility. I
know
|the WD 
|> diag utility has an option to write 0's to the entire drive.
Sometimes I
|do 
|> this and then run the extended diags just to get a 'feel good'
factor on
|the 
|> media. Trouble with this is the larger the disk gets the longer it
|takes. I 
|> just like media scans on old disks before I recycle them to a new
|project.
|> 
|> -Mike
|> 
|>
|
|Here is a little script named gpart.nuke that may help you
|
|#! /bin/sh
|echo "What disk do you want"
|echo "to wipe? For example - da1 :"
|read disk
|echo "OK, in 10 seconds I will destroy all data on $disk!"
|echo "Press CTRL+C to abort!"
|sleep 10
|diskinfo ${disk} | while read disk sectorsize size sectors other
|do
|  # Delete MBR and partition table.
|  dd if=/dev/zero of=/dev/${disk} bs=${sectorsize} count=1
|  # Delete GEOM metadata.
|  dd if=/dev/zero of=/dev/${disk} bs=${sectorsize} oseek=`expr
$sectors 
|- 2` count=2
|done
 =


A follow-up to this issue.

I tried to run the dd commands...

Using the LiveFS disc for FreeBSD 9.1, I got some manner of permission
error, indicating that something would not let the dd commands execute.
 Using the LiveFS disc for FreeBSD 8.3, the dd commands completely
successfully.

After zero-ing out the sectors, I tried to install FreeBSD 9.1, and I
continued to get the RAID problems trying to mount root.

So I punted that drive, and used another drive.   FreeBSD 9.1 installed
without an issue, and it is running fine as I type this.

So there is something about that other disk drive (something that is
not in the last two sectors or the first sector) that the 9.1 install
has issues with.




Thanks for the assist.



___
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: 9.1 won't install - GEOM/GRAID issues

2013-01-08 Thread Warren Block

On Tue, 8 Jan 2013, Mike. wrote:


On 1/2/2013 at 12:11 PM Fbsd8 wrote:

I tried to run the dd commands...

Using the LiveFS disc for FreeBSD 9.1, I got some manner of permission
error, indicating that something would not let the dd commands execute.
Using the LiveFS disc for FreeBSD 8.3, the dd commands completely
successfully.

After zero-ing out the sectors, I tried to install FreeBSD 9.1, and I
continued to get the RAID problems trying to mount root.

So I punted that drive, and used another drive.   FreeBSD 9.1 installed
without an issue, and it is running fine as I type this.

So there is something about that other disk drive (something that is
not in the last two sectors or the first sector) that the 9.1 install
has issues with.


RAID metadata could be larger than the last two blocks.  Even a leftover 
GPT backup table is 34 blocks by default.  If the drive is still 
attached to the controller that put the metadata there, it may hide 
those blocks from the user.  The RAID BIOS menus or graid(8) may be 
needed to clear the metadata in that case.  Or move the drive to another 
controller that will not recognize the old metadata.

___
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: 9.1 won't install - GEOM/GRAID issues

2013-01-08 Thread Mike.
On 1/8/2013 at 7:51 AM Warren Block wrote:

|On Tue, 8 Jan 2013, Mike. wrote:
|
|> On 1/2/2013 at 12:11 PM Fbsd8 wrote:
|>
|> I tried to run the dd commands...
|>
|> Using the LiveFS disc for FreeBSD 9.1, I got some manner of
permission
|> error, indicating that something would not let the dd commands
execute.
|> Using the LiveFS disc for FreeBSD 8.3, the dd commands completely
|> successfully.
|>
|> After zero-ing out the sectors, I tried to install FreeBSD 9.1, and
I
|> continued to get the RAID problems trying to mount root.
|>
|> So I punted that drive, and used another drive.   FreeBSD 9.1
installed
|> without an issue, and it is running fine as I type this.
|>
|> So there is something about that other disk drive (something that is
|> not in the last two sectors or the first sector) that the 9.1
install
|> has issues with.
|
|RAID metadata could be larger than the last two blocks.  Even a
leftover 
|GPT backup table is 34 blocks by default.  If the drive is still 
|attached to the controller that put the metadata there, it may hide 
|those blocks from the user.  The RAID BIOS menus or graid(8) may be 
|needed to clear the metadata in that case.  Or move the drive to
another 
|controller that will not recognize the old metadata.
 =

I was also thinking that the RAID meta could be larger than the last
two blocks, but I didn't want to start arbitrarily overwriting blocks
with zeroes.  With the goal of moving along with the install, I
preferred to use a different drive.

I do not think the drive was ever attached to a RAID controller as part
of a RAID array.  As I mentioned earlier, there is a Promise RAID
controller in the box.  That controller was not set up as a RAID
controller, but as a vanilla SATA controller.  And, after checking
inside the box, the drive in question was not plugged into the RAID
controller, but a vanilla SATA port on the motherboard.   It may be
possible that the RAID controller nonetheless did have the opportunity
to put its "mark" on the drive at some point in the distant past.  I
cannot rule that out completely.   It just would have been nice if the
FreeBSD install offered a better way to recover from the problem.

I plan to do a full wipe of the old drive using dd to completely clear
it out.





___
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: KDE4 has no FolderView in FreeBSD 9.1-RELEASE [SOLVED]

2013-01-08 Thread Elias Chrysocheris
Just for the record, I found out that the package x11/kde4-baseapps was not in 
my system. By installing it many of the problems had on KDE4 solved. I don't 
know why it didn't get compiled when installing kde4, but now everything works 
like a charm...

Regards and Happy new year to everybody!
Elias
___
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"


OT: Spam - Was: Re: HI

2013-01-08 Thread Ralf Mardorf
Please don't reply to spam, since this makes it harder to detect spam by
software.

Happy New Year!
Ralf

PS: I've broken the thread intendedly.

___
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: Which k3b is recommended?

2013-01-08 Thread Ralf Mardorf
On Thu, 2013-01-03 at 09:50 +0100, Leslie Jensen wrote:
> I need k3b on a newly installed 9.1-RELEASE system.
> 
> I wonder if I miss out on some functionality if I go with version 
> without KDE?
> 
> I use XFCE4 as my Desktop.

I don't think so. On Linux I'm running K3b on Xfce. I never noticed that
there's a difference, if KDE isn't installed.

Regards,
Ralf

___
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: Backup with mtree and rsync?

2013-01-08 Thread Lowell Gilbert
schu...@ime.usp.br writes:

> I have been wondering whether it is possible to create a backup system
> using mtree and rsync. Essentially, the user would create a mtree
> specification of the source directory and copy it over to the destination
> directory with rsync. Any changes in the destination could then be
> detected before restoring with the mtree specification, which should
> contain strong hashes of the files and should not contain the nlink
> keyword.
>
> The problem is that mtree would be too slow. It would recompute the
> hashes of big files even when they did not change from the last backup.
> Therefore, I would like to ask if there is an easy way to accomplish
> the following.
>
> Let a mtree specification of a directory from a certain point in the
> past be given. Also, assume that a (regular) file below that directory
> has not changed if its current modification time (mtime) equals
> its modification time in the past specification.
> Produce as output the new mtree specification for the directory without
> reading these files.
>
> This is somewhat like rsync does to perform incremental backups.

Except that you have a spec for mtree to be sure the backup copy hasn't
been corrupted. 

I don't see any way to do this directly. What you probably want to do is
use find(1) to pick out the new files to check, and then merge the
changes into the old mtree(8) spec. Not trivial, but the spec syntax is
intended to be easy to parse, so it shouldn't be that hard either.

> P.S.: As an aside, is there an utility in the base system that can
> reproduce the behavior of `rsync --delete -a dir0/ dir1/`?

It's possible that the mtree support in tar(8) might be able to do it,
but it would probably be a lot slower.
___
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: sendmail not working

2013-01-08 Thread Robert Huff

On 1/8/2013 9:18 AM, Robert Bonomi wrote:


  I have compiled sendmail following the instructions in the
  cyrus-sasl port. Sendmail starts, but no mail is processed either
  way.  /var/log/maillog has this:


No clue, except the first message might be saying it's not going to
honor anything from .forward because it's in a group writable directory
which would be considered a security issue.  Try making /home/huff
group read only?


  Done. Restarted sendmail (all parts). Still no mail processed.


> WHAT HAPPENS when you 'telnet' to your mailserver port(s) and try
> doing smtp transaction(s) manually?

I don't get the SMTP prompt.


WHAT HAPPENS when you -try- to send an email _out_?
 Do you get an error email?


No.


 Does it show in the outbound mail queue?
(if it's in the queue, look at the qf* file, to see why it is deferred.)


In /var/spool/mqueue:

V8
T1357573913
K1357659459
N175
P15690892
I0/111/1420867
Mreply: read error from local
Fws
$_localhost [127.0.0.1]
$rESMTP
$sjerusalem.litteratus.org
${daemon_flags}
${if_addr}127.0.0.1
S
A<>
MDeferred: Connection reset by local
rRFC822; h...@jerusalem.litteratus.org
RPFD:
H?P?Return-Path: <g>
H??Received: from jerusalem.litteratus.org (localhost [127.0.0.1])
by jerusalem.litteratus.org (8.14.6/8.14.6) with ESMTP id r07FoGPd052948
for ; Mon, 7 Jan 2013 10:51:53 -0500 
(EST)
(envelope-from h...@jerusalem.litteratus.org)
H?x?Full-Name: Robert Huff
H??Received: (from root@localhost)
by jerusalem.litteratus.org (8.14.6/8.14.6/Submit) id r07FoGrl052947
for huff; Mon, 7 Jan 2013 10:50:16 -0500 (EST)
(envelope-from huff)
H??Date: Mon, 7 Jan 2013 10:50:16 -0500 (EST)
H??From: Robert Huff 
H??Message-Id: <201301071550.r07fogrl052...@jerusalem.litteratus.org>
H??To: undisclosed-recipients:;
H??X-Spam-Status: No, score=4.3 required=5.0 
tests=ALL_TRUSTED,EMPTY_MESSAGE,

MISSING_HEADERS,MISSING_SUBJECT autolearn=no version=3.3.2
H??X-Spam-Level: 
H??X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
jerusalem.litteratus.org


 What do the sendmail log messages say?


Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward 
/home/huff/.forward.jerusalem+: Group writable directory
Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward 
/home/huff/.forward+: Group writable directory
Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward 
/home/huff/.forward.jerusalem: Group writable directory
Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward 
/home/huff/.forward: Group writable directory
Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: smtpquit: 
mailer local exited with exit value 1
Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: 
to=, delay=2+18:16:27, xdelay=00:00:00, mailer=local, 
pri=56791038, relay=local, dsn=4.4.2, stat=Deferred: Connection reset by 
local




Robert Huff


___
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: AARGH... give me some idea for ad-blockers

2013-01-08 Thread Gary Kline
On Tue, Jan 08, 2013 at 11:16:05AM +0100, Harald Weis wrote:
> On Sun, Jan 06, 2013 at 07:40:37PM -0800, Gary Kline wrote:
>  > 
>  > 
>  >itHOught I'd ask the best list which ad-blocking software I should
>  >use.
>  > 
>  >firefox is my std browsers; also use ixquick.
>  > 
>  >thanks for some tips,
> 
> Have a look at midori.

thanks, iwill.


> -- 
> Harald Weis
> ___
> 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"

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
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: Backup with mtree and rsync?

2013-01-08 Thread schultz

I don't see any way to do this directly. What you probably want to do is
use find(1) to pick out the new files to check, and then merge the
changes into the old mtree(8) spec. Not trivial, but the spec syntax is
intended to be easy to parse, so it shouldn't be that hard either.


What I am currently doing somewhat fits your description. I feed find
output into a C program that merges the old description with the
directory state to produce a new description. However, I use a format
different than mtree. I was seeking a shorter, more elegant, solution.


It's possible that the mtree support in tar(8) might be able to do it,
but it would probably be a lot slower.


Wait, can tar be used to remove files?


___
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: Backup with mtree and rsync?

2013-01-08 Thread Polytropon
On Tue, 08 Jan 2013 15:57:39 -0200, schu...@ime.usp.br wrote:
> > It's possible that the mtree support in tar(8) might be able to do it,
> > but it would probably be a lot slower.
> 
> Wait, can tar be used to remove files?

No (not directly, except overwriting directories with content),
but cpdup can; see "man cpdup" for details and inspiration.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
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: sendmail not working

2013-01-08 Thread Chuck Swiger
On Jan 8, 2013, at 9:09 AM, Robert Huff wrote:
>>  WHAT HAPPENS when you 'telnet' to your mailserver port(s) and try
>>  doing smtp transaction(s) manually?
> 
>   I don't get the SMTP prompt.

OK, so sendmail either isn't starting, isn't binding to port 25, or some sort 
of network/firewall issue is blocking the connection.  You should see a log 
entry like:

sendmail[]: starting daemon (8.14.6): SMTP+queueing@01:00:00

...and netstat -an | grep 25 (or similar with lsof) should find a LISTENing 
process on the port.

>> What do the sendmail log messages say?
> 
> Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward 
> /home/huff/.forward.jerusalem+: Group writable directory
> Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward 
> /home/huff/.forward+: Group writable directory
> Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward 
> /home/huff/.forward.jerusalem: Group writable directory
> Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward 
> /home/huff/.forward: Group writable directory
> Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: smtpquit: mailer 
> local exited with exit value 1
> Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: to=, 
> delay=2+18:16:27, xdelay=00:00:00, mailer=local, pri=56791038, relay=local, 
> dsn=4.4.2, stat=Deferred: Connection reset by local

You either need to fix the permissions by running something like:

   chmod go-w / /home /home/huff /etc /etc/mail

...or you can add something like the following to your sendmail.cf:

   O DontBlameSendmail=ForwardFileInGroupWritableDirPath

Regards,
-- 
-Chuck

___
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: AARGH... give me some idea for ad-blockers

2013-01-08 Thread Walter Hurry
On Sun, 06 Jan 2013 19:40:37 -0800, Gary Kline wrote:

> itHOught I'd ask the best list which ad-blocking software I should
>   use.
> 
>   firefox is my std browsers; also use ixquick.

I just use a hosts file and it works well (as long as you're not running 
a web server on port 80 of the localhost, of course).

I use the one at http://winhelp2002.mvps.org/hosts.htm, with a nightly 
cron job to fetch, unzip and dos2unix it, then merge it with my (very 
small) 'real' hosts stub.

___
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: Backup with mtree and rsync?

2013-01-08 Thread Ciprian Dorin Craciun
On Sat, Jan 5, 2013 at 8:12 PM,   wrote:
> I have been wondering whether it is possible to create a backup system
> using mtree and rsync. Essentially, the user would create a mtree
> specification of the source directory and copy it over to the destination
> directory with rsync. Any changes in the destination could then be
> detected before restoring with the mtree specification, which should
> contain strong hashes of the files and should not contain the nlink
> keyword.


A little bit off-topic, but there is a small tool that does
something similar to your suggested `mtree` usage, but specifically
tailored for backups, `rdup`:

  http://miek.nl/projects/rdup

Although I've not used it myself (I use `rdiff-backup` and on
Linux), the idea is pretty similar with what you want to achieve:
* you run `rdup` with an old "descriptor file" plus a target path,
and in turn it generates:
  * a new "descriptor file";
  * a list of files that should be backed up;
* you then decide what you do with the list of files to be
backed-up (i.e. put them in a `tar`, `rysnc` them to a server, etc.);

Hope it helps,
Ciprian.
___
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: sendmail not working

2013-01-08 Thread Robert Bonomi

> From owner-freebsd-questi...@freebsd.org  Tue Jan  8 11:12:57 2013
> Date: Tue, 08 Jan 2013 12:09:36 -0500
> From: Robert Huff 
> To: Robert Bonomi 
> Subject: Re: sendmail not working
> Cc: freebsd-questions@freebsd.org
>
> On 1/8/2013 9:18 AM, Robert Bonomi wrote:
>
>    I have compiled sendmail following the instructions in the 
>    cyrus-sasl port. Sendmail starts, but no mail is processed 
>    either way.  /var/log/maillog has this:
> >>>
> >>> No clue, except the first message might be saying it's not going to 
> >>> honor anything from .forward because it's in a group writable 
> >>> directory which would be considered a security issue.  Try making 
> >>> /home/huff group read only?
> >>
> >>   Done. Restarted sendmail (all parts). Still no mail processed.
>
>  > WHAT HAPPENS when you 'telnet' to your mailserver port(s) and try 
>  > doing smtp transaction(s) manually?
>
>  I don't get the SMTP prompt.

"Insufficient data"
  a) does telnet say "connected"?
  b) if yes, how long did you wait for the banner?
 (if there's a DNS problem, it can be 90 seconds befre the banner line)

For testing, consider running sendmail in -foreground (not as a daemon) with
the debug level turned up.

> > WHAT HAPPENS when you -try- to send an email _out_?
> >  Do you get an error email?
>
>  No.
>
> >  Does it show in the outbound mail queue?
> > (if it's in the queue, look at the qf* file, to see why it is 
> > deferred.)
>
>  In /var/spool/mqueue:
>
> V8 T1357573913 K1357659459 N175 P15690892 I0/111/1420867 Mreply: read 
> error from local Fws
> $_localhost [127.0.0.1]
> $rESMTP
> $sjerusalem.litteratus.org
> ${daemon_flags}
> ${if_addr}127.0.0.1
> S A<> MDeferred: Connection reset by local 
> rRFC822; h...@jerusalem.litteratus.org 
> RPFD: H?P?Return-Path:  H??Received: 
> from jerusalem.litteratus.org (localhost [127.0.0.1])
>  by jerusalem.litteratus.org (8.14.6/8.14.6) with ESMTP id r07FoGPd052948 
>  for ; Mon, 7 Jan 2013 10:51:53 -0500 
>  (EST)
>  (envelope-from h...@jerusalem.litteratus.org)
>  H?x?Full-Name: Robert Huff H??Received: (from root@localhost) by 
>  jerusalem.litteratus.org (8.14.6/8.14.6/Submit) id r07FoGrl052947 for 
>  huff; Mon, 7 Jan 2013 10:50:16 -0500 (EST)
>  (envelope-from huff)
>  H??Date: Mon, 7 Jan 2013 10:50:16 -0500 (EST) H??From: Robert Huff 
>   H??Message-Id: 
>  <201301071550.r07fogrl052...@jerusalem.litteratus.org> H??To: 
>  undisclosed-recipients:; H??X-Spam-Status: No, score=4.3 required=5.0 
>  tests=ALL_TRUSTED,EMPTY_MESSAGE, MISSING_HEADERS,MISSING_SUBJECT 
>  autolearn=no version=3.3.2 H??X-Spam-Level:  
>  H??X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on 
>  jerusalem.litteratus.org
>
> >  What do the sendmail log messages say?
>
> Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward
> /home/huff/.forward.jerusalem+: Group writable directory

Supposedly you fixed the above problem.  But sendmail disagrees.  
check permissions on / /home and /home/huff   if any are symlinks,
check the 'pointed-to' directory as well.

> Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward
> /home/huff/.forward+: Group writable directory
> Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward
> /home/huff/.forward.jerusalem: Group writable directory
> Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: forward
> /home/huff/.forward: Group writable directory
> Jan  8 10:12:44 jerusalem sm-mta[28896]: r05KsfdB048780: smtpquit: mailer 
> local exited with exit value 1 Jan  8 10:12:44 jerusalem sm-mta[28896]: 
> r05KsfdB048780: to=, delay=2+18:16:27, xdelay=00:00:00, 
> mailer=local, pri=56791038, relay=local, dsn=4.4.2, stat=Deferred: 
> Connection reset by local

ok, it's been trying to deliver for nearly three days. with local delivery
(program mail.local) failing. 

mail.local can fail for a number of reasons that shouldn't happen.
  check permissions on the mailbox directory also owner/permissions on the
  mailbox, for starters. maildir quota set??



___
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: Backup with mtree and rsync?

2013-01-08 Thread schultz

I apparently reinvented the wheel. :-)
Thanks for the link, it is indeed very inspiring.

Quoting Ciprian Dorin Craciun :


On Sat, Jan 5, 2013 at 8:12 PM,   wrote:

I have been wondering whether it is possible to create a backup system
using mtree and rsync. Essentially, the user would create a mtree
specification of the source directory and copy it over to the destination
directory with rsync. Any changes in the destination could then be
detected before restoring with the mtree specification, which should
contain strong hashes of the files and should not contain the nlink
keyword.



A little bit off-topic, but there is a small tool that does
something similar to your suggested `mtree` usage, but specifically
tailored for backups, `rdup`:

  http://miek.nl/projects/rdup

Although I've not used it myself (I use `rdiff-backup` and on
Linux), the idea is pretty similar with what you want to achieve:
* you run `rdup` with an old "descriptor file" plus a target path,
and in turn it generates:
  * a new "descriptor file";
  * a list of files that should be backed up;
* you then decide what you do with the list of files to be
backed-up (i.e. put them in a `tar`, `rysnc` them to a server, etc.);

Hope it helps,
Ciprian.




 
___
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: Backup with mtree and rsync?

2013-01-08 Thread schultz

No (not directly, except overwriting directories with content),
but cpdup can; see "man cpdup" for details and inspiration.


True, but cpdup is not part of the base system.


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


sh script problem with capturing return code

2013-01-08 Thread Fbsd8


I can not get the return code from mtree to control
the displaying of a error message.

The mtree at the end of the script does function correctly
because I can tell from the printed output.

When mtree prints comments saying "extra" that means the directory being 
read does not match the specification file. return code should be Not 
equal to zero.


And when they do match IE: no mtree comments printed, that should be a 
return code of zero.


I tried 2 different ways to capture the return code to no joy.
What I am doing wrong?

#! /bin/sh
flavor="/a/mtree.std"
echo "flavor = ${flavor}"
/bin/cat  << EOF |
/set type=dir uname=root gname=wheel
.
etc ignore
..
rootignore
..
usr
homeignore
..
local
etc ignore
..
..
..
..
EOF

 mtree -d -u -p "${flavor}"  || \
   echo "Error invalid directories in flavor ${flavor}."

#mtree -d -p "${flavor}"
#[ $? -eq 0 ] || \
#  echo "Error invalid directories in flavor ${flavor}."
echo "return = $?"


___
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: sh script problem with capturing return code

2013-01-08 Thread Polytropon
On Tue, 08 Jan 2013 16:30:49 -0500, Fbsd8 wrote:
> 
> I can not get the return code from mtree to control
> the displaying of a error message.
> 
> The mtree at the end of the script does function correctly
> because I can tell from the printed output.
> 
> When mtree prints comments saying "extra" that means the directory being 
> read does not match the specification file. return code should be Not 
> equal to zero.
> 
> And when they do match IE: no mtree comments printed, that should be a 
> return code of zero.
> 
> I tried 2 different ways to capture the return code to no joy.
> What I am doing wrong?
> 
> #! /bin/sh
> flavor="/a/mtree.std"
> echo "flavor = ${flavor}"
> /bin/cat  << EOF |
> /set type=dir uname=root gname=wheel
> .
> etc ignore
> ..
> rootignore
> ..
> usr
> homeignore
> ..
> local
> etc ignore
> ..
> ..
> ..
> ..
> EOF
> 
>   mtree -d -u -p "${flavor}"  || \
> echo "Error invalid directories in flavor ${flavor}."
> 
> #mtree -d -p "${flavor}"
> #[ $? -eq 0 ] || \
> #  echo "Error invalid directories in flavor ${flavor}."
> echo "return = $?"

It seems that returning 0 is correct in a case as you mentioned.
The manual at "man mtree" states:

EXIT STATUS
 The mtree utility exits 0 on success, and >0 if an error occurs.

Question: What _is_ an error here?

If you use the source Luke at /usr/src/usr.sbin/mtree/mtree.c,
you could find out what combination of options plus circumstances
found at runtime could trigger an exit status != 0.

The main() functions finishes with exit(status); where status
is either set by functions mtree_specspec() or mtree_verifyspec(),
or manually to 0 when -U is provided and MISMATCHEXIT (is 2) is
encountered.

Again from the manual:

 -uSame as -U except a status of 2 is returned if the file hierarchy
   did not match the specification.

 -UModify the owner, group, permissions, and modification time of
   existing files to match the specification and create any missing
   directories or symbolic links.  User, group and permissions must
   all be specified for missing directories to be created.  Corrected
   mismatches are not considered errors.

However, you're not using -U, but -u, so the last sentence of
the description above should be relevant: No error per se,
even though the status code should be 2.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
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: sh script problem with capturing return code

2013-01-08 Thread Fbsd8

Polytropon wrote:

On Tue, 08 Jan 2013 16:30:49 -0500, Fbsd8 wrote:

I can not get the return code from mtree to control
the displaying of a error message.

The mtree at the end of the script does function correctly
because I can tell from the printed output.

When mtree prints comments saying "extra" that means the directory being 
read does not match the specification file. return code should be Not 
equal to zero.


And when they do match IE: no mtree comments printed, that should be a 
return code of zero.


I tried 2 different ways to capture the return code to no joy.
What I am doing wrong?

#! /bin/sh
flavor="/a/mtree.std"
echo "flavor = ${flavor}"
/bin/cat  << EOF |
/set type=dir uname=root gname=wheel
.
etc ignore
..
rootignore
..
usr
homeignore
..
local
etc ignore
..
..
..
..
EOF

  mtree -d -u -p "${flavor}"  || \
echo "Error invalid directories in flavor ${flavor}."

#mtree -d -p "${flavor}"
#[ $? -eq 0 ] || \
#  echo "Error invalid directories in flavor ${flavor}."
echo "return = $?"


It seems that returning 0 is correct in a case as you mentioned.
The manual at "man mtree" states:

EXIT STATUS
 The mtree utility exits 0 on success, and >0 if an error occurs.

Question: What _is_ an error here?

If you use the source Luke at /usr/src/usr.sbin/mtree/mtree.c,
you could find out what combination of options plus circumstances
found at runtime could trigger an exit status != 0.

The main() functions finishes with exit(status); where status
is either set by functions mtree_specspec() or mtree_verifyspec(),
or manually to 0 when -U is provided and MISMATCHEXIT (is 2) is
encountered.

Again from the manual:

 -uSame as -U except a status of 2 is returned if the file hierarchy
   did not match the specification.

 -UModify the owner, group, permissions, and modification time of
   existing files to match the specification and create any missing
   directories or symbolic links.  User, group and permissions must
   all be specified for missing directories to be created.  Corrected
   mismatches are not considered errors.

However, you're not using -U, but -u, so the last sentence of
the description above should be relevant: No error per se,
even though the status code should be 2.





Well I just tested with -U -u together no joy.
Tested with -U no joy.

My read of the above is -u should cause a return code of 2 when the file 
hierarchy does not match the specification. I don't want -U because I am 
not modifying any content of the directory tree mtree is looking at.


I just don't get the point your trying to make.

Oh the other hand are you saying the script code is correct to capture 
the return code but using wrong options with mtree ?





___
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: Bash history empty on login

2013-01-08 Thread Andre Goree
On 01/08/13 09:11, Trond Endrestøl wrote:
> On Tue, 8 Jan 2013 09:05-0500, Andre Goree wrote:
> 
>> On Tue, 08 Jan 2013 07:59:51 -0500, Dimitri Yioulos 
>> wrote:
>>
>>>
>>> Hope I'm not offending you if the following are things
>>> you've tried as a matter-of-course:
>>>
>>> After booting up, is history started, or do you have to do
>>> that manually?  Have you run "set -o" to see if history is
>>> enabled?  If it isn't, then "set -o history".  Is a "clear"
>>> command being issued from anywhere upon logout or reboot?
>>>
>>> Just some thoughts.
>>>
>>
>> No offense at all, thanks for your suggestions!  I'm currently at work so 
>> I'll
>> test this when I get home (this is on a desktop running 8.3-stable).  I've
>> never had to do anything special when using bash on FreeBSD.  I'll be sure to
>> check th output of "set -o" and report back here.
>>
>> If there's an erroneous 'clear' command somewhere, it must be on logout since
>> I can easily test this problem being that I use tmux.  :)  I also do not have
>> a .bash_logout file, if that matters.
>>
>> Thanks for the suggestions, I'll let you know what turns up.
> 
> What are the permissions of ~/.bash_history?
> 
> Usually they are set to 0600 in octal due to security concerns and 
> rightfully so. Could they be (re)set to 0400 or even ?
> 

I think I've found the culprit, however:
[agoree@desktop ~]$ echo $HISTFILESIZE
1024000
[agoree@desktop ~]$ echo $HISTFILE
/home/agoree/.bash_history
[agoree@desktop ~]$ ll /home/agoree/.bash_history
-rw---  1 agoree  agoree12k Jan  5 14:09 /home/agoree/.bash_history
[agoree@desktop ~]$ cat /home/agoree/.bash_history
cat: /home/agoree/.bash_history: Input/output error
[agoree@desktop ~]$ file /home/agoree/.bash_history
/home/agoree/.bash_history: ERROR: cannot read
`/home/agoree/.bash_history' (Input/output error)

I suppose I'm in need of a scrub, eh?  Or perhaps just a tweak to
$HISTFILE until I have the time (or energy) to deal with the scrub --
probably not a good idea, but sense all my important data is kept on a
NAS...  :p


-- 
Andre Goree
an...@drenet.info
___
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: Bash history empty on login

2013-01-08 Thread Andre Goree

> I think I've found the culprit, however:
> [agoree@desktop ~]$ echo $HISTFILESIZE
> 1024000
> [agoree@desktop ~]$ echo $HISTFILE
> /home/agoree/.bash_history
> [agoree@desktop ~]$ ll /home/agoree/.bash_history
> -rw---  1 agoree  agoree12k Jan  5 14:09 /home/agoree/.bash_history
> [agoree@desktop ~]$ cat /home/agoree/.bash_history
> cat: /home/agoree/.bash_history: Input/output error
> [agoree@desktop ~]$ file /home/agoree/.bash_history
> /home/agoree/.bash_history: ERROR: cannot read
> `/home/agoree/.bash_history' (Input/output error)
> 
> I suppose I'm in need of a scrub, eh?  Or perhaps just a tweak to
> $HISTFILE until I have the time (or energy) to deal with the scrub --
> probably not a good idea, but sense all my important data is kept on a
> NAS...  :p
> 
> 


So, yeahhh...:

NAMESTATE READ WRITE CKSUM
zroot   ONLINE   0 0   586
  ad4s1dONLINE   0 0 0
  ad8s1dONLINE   0 0   586

errors: Permanent errors have been detected in the following files:

/usr/local/share/icons/hicolor/128x128/apps/vlc.png
zroot/usr:<0x11ae0a>
zroot/usr:<0x109118>
zroot/usr:<0x11ae18>
zroot/usr:<0x11ae19>
zroot/usr:<0x11ae1d>
zroot/usr:<0x11ae1e>
zroot/usr:<0x18b61e>
zroot/usr:<0x18b622>
zroot/usr:<0x18b62e>
zroot/usr:<0x18b637>

/usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.42.6/e2fsck/e2fsck.c.bak
zroot/usr:<0x18b63c>
zroot/usr:<0x18b63d>
zroot/usr:<0x18b641>
zroot/usr:<0x18b642>
zroot/usr:<0x109256>
/usr/home/agoree/.opera.bak/icons/www.google.com.idx
/usr/home/agoree/.opera.bak/download.dat
/usr/home/agoree/.cache/chromium/Default/Cache/data_1
/usr/home/agoree/.opera.bak/typed_history.xml
/usr/home/agoree/.bash_history
zroot/usr:<0x109199>
zroot/usr:<0x11ad9b>
/usr/local/share/locale/fo/LC_MESSAGES/cairo-dock.mo
/usr/local/lib/qt4/plugins/script/libqtscript_core.so.1.0.0
zroot/var:<0x98bf>


I'll probably just go ahead and reinstall -- I've been wanting to give
9.1 a try anyways.


-- 
Andre Goree
an...@drenet.info
___
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"


poudriere jail stable/0 create via svn: auditdistd user is missing

2013-01-08 Thread Patrick Lamaiziere
Hello,

# poudriere jail -c -j 9amd64 -v stable/9 -m svn
...
--
>>> World build completed on Wed Jan  9 01:32:43 CET 2013
--
>> Starting make installworld
ERROR: Required auditdistd user is missing, see /usr/src/UPDATING.
*** Error code 1

Stop in /poudriere/jails/9amd64/usr/src.
*** Error code 1

Stop in /poudriere/jails/9amd64/usr/src.
>> Error: Fail to install world
>> Error while creating jail, cleaning up.
>> Removing 9amd64 jail...done

Any idea to work-around this (in a normal buildworld I would use
mergesmaster -p) ? I'm using an old 9-stable from april.

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


how to change from STABLE to RELEASE?

2013-01-08 Thread Antonio Olivares
Dear folks,

I am happily running FreeBSD 9.0-STABLE on one of my machines, but I
want to move to FreeBSD-RELEASE and use
# freebsd-update upgrade -r 9.1-RELEASE
but it does not find a valid repository.  How can I solve this issue
to move to newer RELEASE and avoid staying on STABLE because I will
have to compile/build world and it takes a good while to build and
then may have to rebuild all the ports.

Thanks in advance for suggestions/advice and words of caution.

Best Regards,



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


Re: how to change from STABLE to RELEASE?

2013-01-08 Thread Fbsd8

Antonio Olivares wrote:

Dear folks,

I am happily running FreeBSD 9.0-STABLE on one of my machines, but I
want to move to FreeBSD-RELEASE and use
# freebsd-update upgrade -r 9.1-RELEASE
but it does not find a valid repository.  How can I solve this issue
to move to newer RELEASE and avoid staying on STABLE because I will
have to compile/build world and it takes a good while to build and
then may have to rebuild all the ports.

Thanks in advance for suggestions/advice and words of caution.

Best Regards,



Antonio




Give this a try

setenv UNAME_r "9.0-RELEASE"
freebsd-update fetch update
freebsd-update upgrade -r 9.1-RELEASE
___
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"


Gain Organic Traffic: Freebsd.Org :PS

2013-01-08 Thread Justin Taylor



Hi Freebsd.Org Team,

I thought you might like to know some of the reasons why you are not getting
enough organic & social media traffic on your website.

I would like to update you that your website is still not ranked on the top
pages of Google SERPs for your popular keywords (Products). Your loss is  
your
competitor’s gain i.e. the traffic which could have generated quality sales  
for

you goes to your competitors as they rank well in the Search Engine Result
Pages (SERPs) organically.

Reasons: 

1.    HTML and other on-page errors are present on your website.
2.    Low number of internal and external quality links present
on your website.
3.    Duplicate or low quality contents present in your website
without any regular update.
4.    Need to update fresh contents on your website and blogs as
per the latest Google guideline.
5.    Broken Links and Poison words might be present in your
website.
6.    Social media profile needs to be updated regularly.

Long gone are the days when Google used to give priority to websites of  
keyword
based domains or websites with huge number of links. Now Google counts each  
and

every detail to verify if your website is relevant to the keywords you are
promoting for. A single un-wanted link or a duplicate content can lead your
website to be penalized by Google.

We are a leading website promotion company providing online promotion, SMO,
Reputation Management, Content (both web and promotional content) fixing
services to clients. We have a team of 240+ SEO professional working
24*7.  Our team of dedicated Google Analytic and Adwords certified
professionals excel in promoting and increasing the visibility of a website  
in
various search engines (including the latest Google Panda and Penguin  
updates),

which will directly help in increasing traffics for your website.

Unlike other SEO companies we do not believe in talking rather we believe in
delivering what we promise to our clients. We provide guaranteed services or
money back-guarantee to all our clients who consider working with us.

If you are getting rigid by paying a huge amount in PPC then Organic  
listing by

using white hat technique will be definitely a right choice for you. As the
rate of conversion is more in organic listing as compared to PPC,  
eventually it

will be an absolute gain for you.  

This email just tells you the fraction of things we do, our optimization
process involves many other technical factors which can be sent to you on  
your
request. If you would like to know more about our services then please  
write us

back else you can give us a call us in our number below.

P.S: - This is our marketing strategy that we use the Gmail account. Once  
you
reply us back, the next communication I will do is from my corporate email  
ID.


Let me know your thoughts and looking forward to work together.

Best Regards, 
Justin Taylor|Senior SEO Advisor
PH. No: (217) 650-7095
Skype: justintaylor888
--
Note: 
1: This is a onetime email and you may ask us to “REMOVE”.
2:  If you are interested I will send more details on our “corporate
identity”, “company profile”, “why you should choose us?”, “Price list”,  
“money

back” etc. in my next mail.

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


which version of FBSD should i install?

2013-01-08 Thread Gary Kline

guys,

I used my EEE-900a [[last year]] to wow the medical team downtown
with my unfinished VBC program.  since nobody seems willing to
volunteer to test the (*almost*)-finished version, I figure I
ms well use my 2005 Thinkpad.  it is reasonably fast at 3.06GHz.
should clue me in on how much stuff I need to compile to test.

I want the Gnome Desktop, espeak, and gvim.  If there is a CD 
or DVD with 9.x, can somebody give me a URL?

tia,

gary

PS: The reason that vbc is only "almost" finished is that I need
to do a much better job outlining a.) the basics of using gvim,
b.) the basics of using the application, and c.) figuring the 
best way of using the "File" menu dropdown to _Save the 
existing files ... and more.  the  worst part is the
documentation... .

PPS:  ive found and expanding a few lines {maybe 15-20} on
gvim/vim/vi.  ineed to know how this reads.  figure you guys will
know.



-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

___
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: which version of FBSD should i install?

2013-01-08 Thread John Levine
>   I want the Gnome Desktop, espeak, and gvim.  If there is a CD 
>   or DVD with 9.x, can somebody give me a URL?

The usual place:

http://www.freebsd.org/releases/9.1R/announce.html

I'm typing this on a Thinkpad X200, which works well under 9.0.

___
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: which version of FBSD should i install?

2013-01-08 Thread Erich Dollansky
Hi,

On Tue, 8 Jan 2013 18:55:04 -0800
Gary Kline  wrote:

>   ms well use my 2005 Thinkpad.  it is reasonably fast at
> 3.06GHz. should clue me in on how much stuff I need to compile to
> test.

You should be able to run anything from 7.4, 8.3, 9.1 to 10.0.

I mention 7.4 here for a simple reason. It could be that your old
machine uses some USB hardware, which is not supported from 8.0 onwards.

I would say, if it works, use 9.1. If not check out 7.4. If this then
works, you could check 10 out.

8.3 is the version which is the most robust one as the new stuff did
not arrive there yet.

Erich
___
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: Bash history empty on login

2013-01-08 Thread Trond Endrestøl
On Tue, 8 Jan 2013 18:49-0500, Andre Goree wrote:

> 
> > I think I've found the culprit, however:
> > [agoree@desktop ~]$ echo $HISTFILESIZE
> > 1024000
> > [agoree@desktop ~]$ echo $HISTFILE
> > /home/agoree/.bash_history
> > [agoree@desktop ~]$ ll /home/agoree/.bash_history
> > -rw---  1 agoree  agoree12k Jan  5 14:09 /home/agoree/.bash_history
> > [agoree@desktop ~]$ cat /home/agoree/.bash_history
> > cat: /home/agoree/.bash_history: Input/output error
> > [agoree@desktop ~]$ file /home/agoree/.bash_history
> > /home/agoree/.bash_history: ERROR: cannot read
> > `/home/agoree/.bash_history' (Input/output error)
> > 
> > I suppose I'm in need of a scrub, eh?  Or perhaps just a tweak to
> > $HISTFILE until I have the time (or energy) to deal with the scrub --
> > probably not a good idea, but sense all my important data is kept on a
> > NAS...  :p
> > 
> > 
>   
> 
> So, yeahhh...:
> 
> NAMESTATE READ WRITE CKSUM
> zroot   ONLINE   0 0   586
>   ad4s1dONLINE   0 0 0
>   ad8s1dONLINE   0 0   586

I don't know if this was intentional, but your zroot pool is 
configured with absolutely no redundancy unless you have set the 
zfs copies property to a value greater than 1 on selected file 
systems if not all file systems. The text quoted below does not 
indicate any of this.

You should at the very least mirror your zroot pool between no less 
than 2 drives/partitions, shouldn't raidz{1,2,3} with the appropriate 
number of drives/partitions prove tempting or possible hardwarewise.

> errors: Permanent errors have been detected in the following files:
> 
> /usr/local/share/icons/hicolor/128x128/apps/vlc.png
> zroot/usr:<0x11ae0a>
> zroot/usr:<0x109118>
> zroot/usr:<0x11ae18>
> zroot/usr:<0x11ae19>
> zroot/usr:<0x11ae1d>
> zroot/usr:<0x11ae1e>
> zroot/usr:<0x18b61e>
> zroot/usr:<0x18b622>
> zroot/usr:<0x18b62e>
> zroot/usr:<0x18b637>
> 
> /usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.42.6/e2fsck/e2fsck.c.bak
> zroot/usr:<0x18b63c>
> zroot/usr:<0x18b63d>
> zroot/usr:<0x18b641>
> zroot/usr:<0x18b642>
> zroot/usr:<0x109256>
> /usr/home/agoree/.opera.bak/icons/www.google.com.idx
> /usr/home/agoree/.opera.bak/download.dat
> /usr/home/agoree/.cache/chromium/Default/Cache/data_1
> /usr/home/agoree/.opera.bak/typed_history.xml
> /usr/home/agoree/.bash_history
> zroot/usr:<0x109199>
> zroot/usr:<0x11ad9b>
> /usr/local/share/locale/fo/LC_MESSAGES/cairo-dock.mo
> /usr/local/lib/qt4/plugins/script/libqtscript_core.so.1.0.0
> zroot/var:<0x98bf>

I'm very sorry for your loss, but apparently these files aren't 
critical user data.

> I'll probably just go ahead and reinstall -- I've been wanting to give
> 9.1 a try anyways.

Good luck and don't forget about redundancy! :D

-- 
+---++
| Vennlig hilsen,   | Best regards,  |
| Trond Endrestøl,  | Trond Endrestøl,   |
| IT-ansvarlig, | System administrator,  |
| Fagskolen Innlandet,  | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,   | Cellular...: +47 952 62 567,   |
| sentralbord 61 14 54 00.  | Switchboard: +47 61 14 54 00.  |
+---++___
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: which version of FBSD should i install?

2013-01-08 Thread Gary Kline
On Wed, Jan 09, 2013 at 12:55:49PM +0700, Erich Dollansky wrote:
> Hi,
> 
> On Tue, 8 Jan 2013 18:55:04 -0800
> Gary Kline  wrote:
> 
> > ms well use my 2005 Thinkpad.  it is reasonably fast at
> > 3.06GHz. should clue me in on how much stuff I need to compile to
> > test.
> 
> You should be able to run anything from 7.4, 8.3, 9.1 to 10.0.
> 
> I mention 7.4 here for a simple reason. It could be that your old
> machine uses some USB hardware, which is not supported from 8.0 onwards.
> 
> I would say, if it works, use 9.1. If not check out 7.4. If this then
> works, you could check 10 out.
> 
> 8.3 is the version which is the most robust one as the new stuff did
> not arrive there yet.
> 
> Erich


Thanks for this.  VBC uses no USB hardware... well, AFAIK.  I
=believe= it should work on anything unix. That is: 
Unix, BSD, Linux, Android.  VBC doe require a keyboard since the
disabled user needs to type what he wants to have spoken. If
there are and USB issues there, I have no idea.

gary

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
  Twenty-six years of service to the Unix community.

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


keyboard and mouse problem

2013-01-08 Thread Jack Mc Lauren
Hi guys

I have a freeBSD 8.2 amd64 on my system and I'm using gnome environment. But 
after a few seconds my USB keyboard and  PS/2 mouse hang up !!!

What should I do ?

Thanks in advance ...
___
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: sh script problem with capturing return code

2013-01-08 Thread Lowell Gilbert
Fbsd8  writes:

> Polytropon wrote:
>> On Tue, 08 Jan 2013 16:30:49 -0500, Fbsd8 wrote:
>>> I can not get the return code from mtree to control
>>> the displaying of a error message.
>>>
>>> The mtree at the end of the script does function correctly
>>> because I can tell from the printed output.
>>>
>>> When mtree prints comments saying "extra" that means the directory
>>> being read does not match the specification file. return code
>>> should be Not equal to zero.
>>>
>>> And when they do match IE: no mtree comments printed, that should
>>> be a return code of zero.
>>>
>>> I tried 2 different ways to capture the return code to no joy.
>>> What I am doing wrong?
>>>
>>> #! /bin/sh
>>> flavor="/a/mtree.std"
>>> echo "flavor = ${flavor}"
>>> /bin/cat  << EOF |
>>> /set type=dir uname=root gname=wheel
>>> .
>>> etc ignore
>>> ..
>>> rootignore
>>> ..
>>> usr
>>> homeignore
>>> ..
>>> local
>>> etc ignore
>>> ..
>>> ..
>>> ..
>>> ..
>>> EOF
>>>
>>>   mtree -d -u -p "${flavor}"  || \
>>> echo "Error invalid directories in flavor ${flavor}."
>>>
>>> #mtree -d -p "${flavor}"
>>> #[ $? -eq 0 ] || \
>>> #  echo "Error invalid directories in flavor ${flavor}."
>>> echo "return = $?"
>>
>> It seems that returning 0 is correct in a case as you mentioned.
>> The manual at "man mtree" states:
>>
>> EXIT STATUS
>>  The mtree utility exits 0 on success, and >0 if an error occurs.
>>
>> Question: What _is_ an error here?
>>
>> If you use the source Luke at /usr/src/usr.sbin/mtree/mtree.c,
>> you could find out what combination of options plus circumstances
>> found at runtime could trigger an exit status != 0.
>>
>> The main() functions finishes with exit(status); where status
>> is either set by functions mtree_specspec() or mtree_verifyspec(),
>> or manually to 0 when -U is provided and MISMATCHEXIT (is 2) is
>> encountered.
>>
>> Again from the manual:
>>
>>  -uSame as -U except a status of 2 is returned if the file hierarchy
>>did not match the specification.
>>
>>  -UModify the owner, group, permissions, and modification time of
>>existing files to match the specification and create any missing
>>directories or symbolic links.  User, group and permissions must
>>all be specified for missing directories to be created.  Corrected
>>mismatches are not considered errors.
>>
>> However, you're not using -U, but -u, so the last sentence of
>> the description above should be relevant: No error per se,
>> even though the status code should be 2.
>>
>>
>>
>>
> Well I just tested with -U -u together no joy.
> Tested with -U no joy.
>
> My read of the above is -u should cause a return code of 2 when the
> file hierarchy does not match the specification. I don't want -U
> because I am not modifying any content of the directory tree mtree is
> looking at.
>
> I just don't get the point your trying to make.
>
> Oh the other hand are you saying the script code is correct to capture
> the return code but using wrong options with mtree ?

It works fine for me:

[5023] (lowell-desk) temp> touch foo
[5024] (lowell-desk) temp> mtree -c > ../out
[5025] (lowell-desk) temp> if (mtree < ../out ) ; then echo yes ; else echo 
no ; fi
yes
[5026] (lowell-desk) temp> touch foo
[5027] (lowell-desk) temp> if (mtree < ../out ) ; then echo yes ; else echo 
no ; fi
foo changed
modification time expected Wed Jan  9 02:42:31 2013 found Wed Jan  
9 02:42:47 2013
no
[5028] (lowell-desk) temp> echo $?
0
[5029] (lowell-desk) temp> mtree < ../out
foo changed
modification time expected Wed Jan  9 02:42:31 2013 found Wed Jan  
9 02:42:47 2013
[5030] (lowell-desk) temp> echo $?
2
[5031] (lowell-desk) temp> touch temp
[5032] (lowell-desk) temp> mtree -u < ../out
. changed
modification time expected Wed Jan  9 02:42:37 2013 found Wed Jan  
9 02:49:52 2013 modified
foo changed
modification time expected Wed Jan  9 02:42:31 2013 found Wed Jan  
9 02:42:47 2013 modified
temp extra
[5033] (lowell-desk) temp> echo $?
2

This is exactly what I would expect, and what you said you weren't
getting. You didn't show what you ran your script on, or what the
results were, so I can't tell you what you're doing wrong -- but compare
my example to yours and I'm sure you'll be able to figure it out.

Good luck.
___
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"