Re: remote syslogging

2005-08-13 Thread Steve D.

Try:

+chsfirewall1
local6.notice   /var/log/firewall/chsfirewall1.log
+*

+chsfirewall2
local6.notice   /var/log/firewall/chsfirewall2.log
+*


If that doesn't work try running syslog in debug:

kill -9 `cat /var/run/syslog.pid`

syslogd -d -v -a 172.24.169.44/32:* -a 172.24.169.46/32:*




Aaron Peterson wrote:


in /etc/rc.conf:

syslogd_enable=YES
syslogd_flags=-a 172.24.169.44/32:* -a 172.24.169.46/32:*

---

in syslog.conf:

!*
+chsfirewall1
local6.notice   /var/log/firewall/chsfirewall1.log

+chsfirewall2
local6.notice   /var/log/firewall/chsfirewall2.log



$ ls -l /var/log/firewall

total 0
-rw---  1 root  wheel  0 Aug 12 15:23 chsfirewall1.log
-rw---  1 root  wheel  0 Aug 12 15:33 chsfirewall2.log

-

in /etc/hosts

172.24.169.44   chsfirewall1
172.24.169.46   chsfirewall2

-

$ tcpdump -i fxp0 -w firewall.bin udp and dst port 514

15:58:57.151625 IP chsfirewall1.blackjack  xavier.syslog: UDP, length: 149
15:58:57.151763 IP chsfirewall1.blackjack  xavier.syslog: UDP, length: 149
15:58:57.151889 IP chsfirewall1.blackjack  xavier.syslog: UDP, length: 147
15:58:57.152014 IP chsfirewall1.blackjack  xavier.syslog: UDP, length: 147
15:58:57.152141 IP chsfirewall1.blackjack  xavier.syslog: UDP, length: 149
15:58:57.166549 IP chsfirewall1.blackjack  xavier.syslog: UDP, length: 149
15:58:57.166688 IP chsfirewall1.blackjack  xavier.syslog: UDP, length: 152
15:58:57.166817 IP chsfirewall1.blackjack  xavier.syslog: UDP, length: 149
15:58:57.166965 IP chsfirewall1.blackjack  xavier.syslog: UDP, length: 149
15:58:57.167194 IP chsfirewall1.blackjack  xavier.syslog: UDP, length: 148
15:58:59.086044 IP chsfirewall2.blackjack  xavier.syslog: UDP, length: 148
15:58:59.086179 IP chsfirewall2.blackjack  xavier.syslog: UDP, length: 148
15:58:59.086306 IP chsfirewall2.blackjack  xavier.syslog: UDP, length: 148
15:58:59.109459 IP chsfirewall2.blackjack  xavier.syslog: UDP, length: 149

ethereal outpug for the same traffic:

Frame 2226 (191 bytes on wire, 96 bytes captured)
Ethernet II, Src: 00:04:38:6f:42:04, Dst: 00:50:8b:6c:5d:eb
Internet Protocol, Src Addr: 172.24.169.44 (172.24.169.44), Dst Addr:
172.26.35.21 (172.26.35.21)
User Datagram Protocol, Src Port: blackjack (1025), Dst Port: syslog (514)
Syslog message: LOCAL6.NOTICE:  13445 08/12/2005 16:09:20 t...

No. TimeSourceDestination   Protocol Info
  2227 0.922397172.24.169.44 172.26.35.21  Syslog
 LOCAL6.NOTICE:  13445 08/12/2005 16:09:20 t...

Frame 2227 (190 bytes on wire, 96 bytes captured)
Ethernet II, Src: 00:04:38:6f:42:04, Dst: 00:50:8b:6c:5d:eb
Internet Protocol, Src Addr: 172.24.169.44 (172.24.169.44), Dst Addr:
172.26.35.21 (172.26.35.21)
User Datagram Protocol, Src Port: blackjack (1025), Dst Port: syslog (514)
Syslog message: LOCAL6.NOTICE:  13445 08/12/2005 16:09:20 t...

No. TimeSourceDestination   Protocol Info
  2228 2.841247172.24.169.46 172.26.35.21  Syslog
 LOCAL6.NOTICE:  6129 08/12/2005 16:05:34 tE...

Frame 2228 (190 bytes on wire, 96 bytes captured)
Ethernet II, Src: 00:04:38:6f:42:04, Dst: 00:50:8b:6c:5d:eb
Internet Protocol, Src Addr: 172.24.169.46 (172.24.169.46), Dst Addr:
172.26.35.21 (172.26.35.21)
User Datagram Protocol, Src Port: blackjack (1025), Dst Port: syslog (514)
Syslog message: LOCAL6.NOTICE:  6129 08/12/2005 16:05:34 tE...

No. TimeSourceDestination   Protocol Info
  2229 2.841382172.24.169.46 172.26.35.21  Syslog
 LOCAL6.NOTICE:  6129 08/12/2005 16:05:42 tE...

Frame 2229 (190 bytes on wire, 96 bytes captured)
Ethernet II, Src: 00:04:38:6f:42:04, Dst: 00:50:8b:6c:5d:eb
Internet Protocol, Src Addr: 172.24.169.46 (172.24.169.46), Dst Addr:
172.26.35.21 (172.26.35.21)
User Datagram Protocol, Src Port: blackjack (1025), Dst Port: syslog (514)
Syslog message: LOCAL6.NOTICE:  6129 08/12/2005 16:05:42 tE...

No. TimeSourceDestination   Protocol Info
  2230 2.841509172.24.169.46 172.26.35.21  Syslog
 LOCAL6.NOTICE:  6129 08/12/2005 16:05:47 tE...

Frame 2230 (190 bytes on wire, 96 bytes captured)
Ethernet II, Src: 00:04:38:6f:42:04, Dst: 00:50:8b:6c:5d:eb
Internet Protocol, Src Addr: 172.24.169.46 (172.24.169.46), Dst Addr:
172.26.35.21 (172.26.35.21)
User Datagram Protocol, Src Port: blackjack (1025), Dst Port: syslog (514)
Syslog message: LOCAL6.NOTICE:  6129 08/12/2005 16:05:47 tE...

No. TimeSourceDestination   Protocol Info
  2231 2.864662172.24.169.46 172.26.35.21  Syslog
 LOCAL6.NOTICE:  6129 08/12/2005 16:05:48 tE...

Frame 2231 (191 bytes on wire, 96 bytes captured)
Ethernet II, Src: 00:04:38:6f:42:04, Dst: 00:50:8b:6c:5d:eb

Re: 5-Button Trackball

2004-02-06 Thread Steve D
On Friday 06 February 2004 07:24 pm, Jeff Elkins wrote:

 I'm using a 5-button Microsoft Trackball/Explorer (a gift) that
 functions perfectly under Debian Unstable/KDE3.1

[...]
 Section InputDevice
   Identifier Mouse0
   Driver mouse
   Option Protocolauto
   Option Device  /dev/sysmouse
   Option ZAxisMapping4 5
   Option Buttons 5
 EndSection

 but only three of the buttons are functional. Are there any tips
 for making this beast work with FreeBSD 5.2?
--- --- ---


I don't know if this will help you, but I'll describe how I got my 
trackball (a Logitech Marble Mouse USB) to work with FreeBSD 
(currently using 5.1). I used xev in X during the process in order to 
see what X thought was happening when I pressed various buttons or 
moved the trackball on the mouse.

Like you, I use the FreeBSD mouse daemon (moused) in the XF86Config 
file (Option Device  /dev/sysmouse). My trackbal has two large 
buttons, one on either side, and two smaller buttons located just at 
the top side of the larger buttons, one on each side. Those are 
normally used for scrolling in Windows or the MacOS.

Although the trackball has only four buttons, I used 'Options 
Buttons 5' in XF86Config because I set the mouse daemon to 
emulate a third (middle) button with the -3 option.

In addition, I wanted to enable scrolling. So my XF86Config looks like 
yours with respect to the following:

   Option ZAxisMapping4 5
   Option Buttons 5

So, even though my trackball only has four buttons, I told X that it 
has 5 (four physical buttons and an additional virtual middle button 
supplied by the mouse daemon, used by pressing both the left and 
right buttons at the same time). In addition, because I am asking X 
to use the mouse daemon (/dev/sysmouse), I gave the mouse daemon an 
extra flag:

-z 4

which tells the mouse daemon to report a z-axis movement (vertical 
scrolling) when the fourth button is pressed and held while the 
trackball is moved. When X starts and I press the fourth button (the 
small button above the large left button) while moving the trackball, 
the FreeBSD mouse daemon (moused) reports z-axis movement to X just 
as though I were repeatedly pressing a fourth and fifth button for 
up and down scrolling, so the 'Option ZAxisMapping 4 5' in 
XF86Config works.

So, to summarize, in my XF86Config file I have:

Section InputDevice
Identifier  Mouse0
Driver  mouse
Option  Protocol Auto
Option  Device /dev/sysmouse
Option  Buttons 5
Option  ZAxisMapping 4 5
EndSection

--notice that there is no 'Option Emulate3Buttons' in my XF86Config 
file--the FreeBSD mouse daemon does the emulation instead, both on 
the command line and for XFree86--

and my /etc/rc.conf file includes:

moused_enable=YES
moused_type=auto
moused_port=/dev/ums0
# the port listed above refers to my USB, not a PS/2, trackball
moused_flags=-3 -z 4

Best wishes,

Steve D
New Mexico, US
-- 

I have not a particle of confidence in a man who has no redeeming 
vices. -Mark Twain


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD 5.1, Cups problem

2004-01-17 Thread Steve D
On Saturday 17 January 2004 05:50 pm, Dr. Lyman Hazelton wrote:
 Indeed, we have a big problem getting CUPS to work with FreeBSD
 5.1.
---

Great information.

I also use FreeBSD 5.1 and was having trouble with CUPS. One day I 
noticed a post to the freebsd-questions email list about 
freebsddiary.org. I went to the website and noticed an article about 
CUPS configuration on FreeBSD. I followed the advice in the article 
and got CUPS to work on my machine. Here is the link to that article:

http://www.freebsddiary.org/cups.php

-Steve D
New Mexico US
-- 

Laws are made for men of ordinary understanding, and should therefore
be construed by the ordinary rules of common sense. Their meaning is
not to be sought for in metaphysical subtleties, which may make 
anything mean everything or nothing, at pleasure. -Thomas Jefferson


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Installing PCI modem in machine with 4 serial ports (HELP!)

2004-01-05 Thread Steve D
On Monday 05 January 2004 11:02 am, Philip Hallstrom wrote:
 Hi -
   I've got a little computer that has four serial ports built-in to
 the motherboard.  I want to add a PCI modem (USR 5610B) and am
 having a devil of a time.  I know this modem works since I've used
 it (well, another one just like it) in another machine no problem.
 [...]

 The last time I did this it just worked.  However, this bit from
 the Handbook has me concerned:

 These are the four serial ports referred to as COM1 through
 COM4 in the MS-DOS/Windows world.
---

That's the modem I use (the US Robotics 5610B internal PCI card modem 
with FreeBSD 5.1)--great modem.

Because the modem is inside the computer on the PCI bus, and not 
attached to one of the two serial ports on the outside of the 
motherboard (each of which does double duty as two COM ports), it 
is NOT any of COM 1 through COM 4. In FreeBSD (in 5.1 anyway), here 
are the equivalent devices:

WindowsFreeBSD 5.1
------
COM 1  -  /dev/cuaa0
COM 2  -  /dev/cuaa1
COM 3  -  /dev/cuaa2
COM 4  -  /dev/cuaa3
A PCI-card modem, with its own port on its card - /dev/cuaa4

-Steve D
New Mexico US

-- 

Life is full of answers, if you don't care what the questions are.


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: All the possible Kernel options

2004-01-05 Thread Steve D
On Monday 05 January 2004 05:53 am, Dany wrote:
 This week-end I was trying to get my Atapi CDRW to burn something
 and noticed I needed the CAM support enabled for it. Reading the
 handbook gave me the necessary option for the kernel : *device
 atapicam

 *It worked but I remember posting a question about where to find
 all the different options for the Kernel.
 The response was easy and located into the /sys/i386/conf/NOTES
 file (under 5.x).

 The thing is I couldn't find any trace of the Device atapicam in
 either GENERIC or NOTES. Is this normal or is there any other
 hidden options I should be aware of ?

--- ---

Try this:

shell-prompt:  cd /sys/i386/conf
shell-prompt:  make LINT
shell-prompt:  grep atapicam LINT

-- 

Our care should not be to have lived long as to have lived enough.
-Seneca


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Extra FreeBSD 4.9 CD set for giveaway

2003-12-22 Thread Steve D
Hello all--

I was shipped an extra set of FreeBSD 4.9 CDs (November, 2003) if 
someone would like the set for free. It is still shrinkwrapped.

Steve
-- 

A wise man never knows all, only fools know everything.
-African proverb


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: frustration (freeBSD ports system)

2003-12-17 Thread Steve D
On Tuesday 16 December 2003 05:52 pm, richard michael bagstad wrote:
 i find this frustrating.  on your website (page
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-
 using.html)  the following tells me that 'from cd' and 'from
 internet' are exactly the same...  it does not tell me the directory
 of (ie.) lsof.  it simply tells me to 'make install'.  please help a
 poor green newbie.
---

Hello from one FreeBSD newbie to another --

In FreeBSD, the ports are basically information and instructions for 
various system utility programs (like the program make), in order to 
automate, to some extent, the installation of programs that the FreeBSD 
user would like to install.

All of the ports reside in the directory:

/usr/ports

which is to say that inside the /usr directory, which is one of the top 
level directories (immediately under the root directory), there is a 
directory called ports, and inside that directory are quite a few 
directories which are categories of related programs, such as audio, 
editors, finance, databases etc.

In each of those subdirectories there are directories for many different 
programs, each in its own subdirectory, like:

/usr/ports/editors/nedit

nedit is a text editor whose information and instructions reside in the 
directory nedit that is inside the directory editors which is 
itself inside the ports directory in the directory usr

It is important to remember that the program itself is not inside its 
associated directory (nedit, the program or its source files, are not 
inside the /usr/ports/editors/nedit directory). Instead, the 
information and instructions contained within the nedit directory tell 
the system to look for and get the files it needs to build nedit.

The usual place these files are stored (after they are placed there by 
the user or a program) is in /usr/ports/distfiles. If the files are not 
already in /usr/ports/distfiles, then they will be fetched via the 
Internet (you must be connected to the Internet at the time, of course) 
and placed in the /usr/ports/distfiles directory.

If, on the other hand, you happen to have a CD that has those distfiles 
already on it, you can copy those files, yourself, from the CD into the 
directory /usr/ports/distfiles. Then when you enter one of the ports 
directories like:

cd /usr/ports/editors/nedit

and issue the following command:

make

the file(s) will be found in the /usr/ports/distfiles directory (because 
you placed them there yourself, by copying them from a CD), instead of 
the system having to get them from the Internet.

I hope this makes sense.

Best wishes,

Steve D
-- 

You grow up on the day you have your first real laugh at yourself.
-Ethel Barrymore


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Auto thumbnail/index.html generation program in ports?

2003-11-16 Thread Steve D
picfolio -- an image gallery generator

To add to my previous (a couple weeks ago) response to a question about 
programs that might generate thumbnail-sized images and html galleries 
from directories of images, there is a great program called picfolio 
that does not appear within the FreeBSD ports collection, but which 
works great on FreeBSD.

Picfolio outputs xml files that are transformed by xslt stylesheets to 
produce (typically) HTML or XHTML documents. A picfolio user who learns 
xslt can write his or her own stylesheets to precisely control and 
customize picfolio's xml output (into strict XHTML 1.1 and CSS2, for 
example). In this respect, picfolio is a much better choice than many 
of the other web gallery generators which often produce a very 
particular, mostly unconfigurable form of HTML (which may not be very 
well written, or might be older HTML which includes deprecated tags, 
for example).

Picfolio's webpage is at:

http://pmade.org/software/picfolio/

-Steve D
Portales, NM US

-- 

Do not condemn the judgement of another because it differs from
your own. You may both be wrong. -Dandemis


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fwd: Help: tar find

2003-10-23 Thread Steve D
On Wed, Oct 22, 2003 at 10:43:50PM -0600, Scott Gerhardt wrote:
 I am having trouble combining the tar and find command.  I want to
 tar and
 delete all .bak,.Bak,.BAK files.

 I am using the following command but keep receiving errors.
[...]
 The script is as follows
 =
 #! /bin/bash
 set +x
 TAR_DIR=/home/tarbackups;
 FILES_DIR=/home/common;
 tar --remove-files -cvzpf $TAR_DIR/bak_files_`date +%F`.tar.gz\
   `find $FILES_DIR -xdev -type f -iname *.bak`;
 ==
[...]
 Here is some error output returned:

 tar: jobs/ROOF: Cannot stat: No such file or directory
 tar: LAYOUTS/RESIDENTIAL/FRASER/219: Cannot stat: No such file or
 directory
 tar: LEWIS: Cannot stat: No such file or directory
 tar: CRES.bak: Cannot stat: No such file or directory
[...]

--- --- ---

Matthew Seaman [EMAIL PROTECTED] replied:
 The problem is that you have file/directory names like 'ROOF LAYOUTS'
 which contain spaces and possibly other filenames containing
 characters with syntactic significance to the shell.

 Try:

 find $FILES_DIR -xdev -type f -iname *.bak -print0 | \
 xargs -0 tar --remove-files -cvzpf $TAR_DIR/bak_files_`date
 +%F`.tar.gz


--- --- ---

Would the following approach also work? (Have sed surround each item
returned by the find command with single quotes?)
---
#! /bin/bash
set +x
TAR_DIR=/home/tarbackups;
FILES_DIR=/home/common;
tar --remove-files -cvzpf $TAR_DIR/bak_files_`date +%F`.tar.gz\
`find $FILES_DIR -xdev -type f -iname *.bak | sed s/\(^.*$\)/'\1'/`;
---

or the backticks in the last line replaced with the newer alternative $():

$( find $FILES_DIR -xdev -type f -iname *.bak | sed s/\(^.*$\)/'\1'/ ) ;

 
Do the characters \ * $ in sed's argument need to be quoted further,
to protect them from interpretation by the shell? The find portion
of the command works correctly, as written above, on my FreeBSD machine
using /bin/sh or /usr/local/bin/bash, but I don't know why those 
characters in sed's argument don't need to be further escaped.

--- --- ---

Steve D
Portales, NM US

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Fwd: Help: tar find

2003-10-23 Thread Steve D
Steve D [EMAIL PROTECTED] wrote:

 Would the following approach also work? (Have sed surround each
 item returned by the find command with single quotes?)
 ---
 #! /bin/bash
 set +x
 TAR_DIR=/home/tarbackups;
 FILES_DIR=/home/common;
 tar --remove-files -cvzpf $TAR_DIR/bak_files_`date +%F`.tar.gz\
 `find $FILES_DIR -xdev -type f -iname *.bak | sed s/\(^.*$\)/'\1'/`;

 or the backticks in the last line replaced with the newer
 alternative $():

 $( find $FILES_DIR -xdev -type f -iname *.bak | sed s/\(^.*$\)/'\1'/ ) ;

---

Matthew Seaman [EMAIL PROTECTED] responded:

 You've apparently got double quotes inside a double quoted string.
 That doesn't work.

 Trying to enclose the output of find in quote marks will sort of
 work, but it's generally found to be flaky.  Especially when the
 filenames you're dealing with also contain quotation marks of various
 types or return characters.  This is exactly why the '-print0'
 primitive for find(1) was invented: it puts out a list of file names
 separated by ascii NULL characters, which is one of the two ascii
 characters you can't get in a filename. (The other is '/' -- the
 directory separator).

[...]

---

Thank you Matthew for this information. Interestingly, the double quotes
inside double quotes seems to work on my machine (using
/usr/local/bin/bash), perhaps because the contents inside the $( ) 
are processed in a subshell? Output of terminal session follows:

   ~/tmp/test touch 'filename with spaces.bak' 'file two.bak' file3.txt file4.BAK
   ~/tmp/test ls -l
total 0
-rw-r--r--  1 xscd  xscd  0 Oct 23 11:45 file two.bak
-rw-r--r--  1 xscd  xscd  0 Oct 23 11:45 file3.txt
-rw-r--r--  1 xscd  xscd  0 Oct 23 11:45 file4.BAK
-rw-r--r--  1 xscd  xscd  0 Oct 23 11:45 filename with spaces.bak
   ~/tmp/test
   ~/tmp/test echo $(find . -xdev -type f -iname *.bak | sed s/\(^.*$\)/'\1'/)
'./filename with spaces.bak'
'./file two.bak'
'./file4.BAK'
   ~/tmp/test

Now because of your response I am motivated to read and learn more
about find's -print0 option and about xargs. Thank you.

Steve D
Portales, NM US

-- 

Civilization is a process in search of humanity. -Eli Khamarov


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Shell script--batch rename files

2003-10-08 Thread Steve D
mvb (MV-Batch shell script)

To the several people who wrote to me about my batch-rename shell 
script, and anyone else who may be interested, I have worked a lot on 
it the past few days and the latest version (1.5.5) and a screenshot 
and README is at:

http://www.xscd.com/pub/mvb/

I'll try to keep subsequent versions, if any, in the same location.

Because I am learning shell scripting, I appreciate any criticisms, 
comments or suggestions from more proficient programmers and users.

The script works well for me, especially for quickly renaming image 
files that have been downloaded from my digital camera or from the 
Internet and sorted into directories by theme.

Best wishes,

Steve Doonan
Portales, NM US

-- 

A smooth sea has never made a good sailor.


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]