string manipulation in a shell script

2004-07-17 Thread Kathy Quinlan
Hi guys and Gals,
I have a simple script:
#!/bin/sh
a=ia$(date +%d%m%Y)
tar -cf $a.zip /usr/home/projects/lunaria/items all
mv $a.zip /usr/home/itemsall/
this nearly does what I want, I would like to put the time in the file 
name aswell. If I put the %T in the date variable, the resultant value 
for $a has : seperating the hours, minutes and seconds.

Try as I might, I can not find away to remove the : and tar spits the 
dummy at them and it causes an IO device error.

I looked through sed and awk, and spent an hour playing, but all to no 
avail.

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


Re: string manipulation in a shell script

2004-07-17 Thread Kathy Quinlan
Matthew Seaman wrote:
On Sat, Jul 17, 2004 at 04:33:27PM +0800, Kathy Quinlan wrote:
Hi guys and Gals,
I have a simple script:
#!/bin/sh
a=ia$(date +%d%m%Y)
tar -cf $a.zip /usr/home/projects/lunaria/items all
mv $a.zip /usr/home/itemsall/
this nearly does what I want, I would like to put the time in the file 
name aswell. If I put the %T in the date variable, the resultant value 
for $a has : seperating the hours, minutes and seconds.

Try as I might, I can not find away to remove the : and tar spits the 
dummy at them and it causes an IO device error.

I looked through sed and awk, and spent an hour playing, but all to no 
avail.

Anyhelp apreciated,

Well, to get date(1) to spit out a date-time string without any
unfortunate punctuation, try something like:
% date +%Y%m%d%H%M%S
See strftime(3) for details of all the % escapes you can use with
date(1).
On the other hand, tar(1) has an option --force-local which causes it
to ignore colons in filenames as indicating a remote tape drive.
Nb. that's gnu tar, which is the standard tar in all 4.x and any
5.x-RELEASE -- 5.2-CURRENT will shortly switch to bsdtar, and that
will probably work differently.
Thanks Matthew,
I looked in date, but was not aware of strftime.
This is exactly what I needed :)
Regards,
Kat.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: rc.conf

2004-06-25 Thread Kathy Quinlan
Chris limina wrote:
I'm running bsd 5.2.1
 
there is a syntax error in my rc.conf
 
what course of action do i take to repair it without having to re-install.
 
There should be a way to easily fix this. but none of the boot options allow me to edit
that file.
 
elighten me please.
Read the handbook, it details how to boot into single mode, check the 
disks and then mout them RW so you can edit rc.conf

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


Networking problem

2004-03-04 Thread Kathy Quinlan
I have a friend who can not get his FreeBSD 5.2 server to act as a
gateway, from the internal network we can ping the external network
card, but no further. From the server we can ping the entire world.

I had him bring it over and set up my server (FreeBSD 4.8R as the
gateway) so I now have:

ISPMy Server---his Server---laptop

From the laptop I can ping as far as the external nic on his server.
From his server I can ping the world.

I have googled, looked at the mailing list, but can not find the problem
:o( I have re installed the server, incase he goofed up, same problem, I
have swapped the external network card, same problem.

Netstat -rn shows the default gateway (as my server) 

In rc.conf it has gateway_enable=YES

I am out of ideas

Regards,

Kat.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.593 / Virus Database: 376 - Release Date: 20/02/2004
 

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


Networking problem UPDATED

2004-03-04 Thread Kathy Quinlan
I have a friend who can not get his FreeBSD 5.2 server to act as a
gateway, from the internal network we can ping the external network
card, but no further. From the server we can ping the entire world.

I had him bring it over and set up my server(FreeBSD 4.8R as the
gateway) all my clients can use my FreeBSD server fine, so I do not
think the problem is in it, so I now have:


ISPMy Server---his Server---laptop

My Server to ISP is a dynamic IP (ppp dialup)
My server internal network is 192.168.0.1
His server to my server is connected to my servers hub and his server
uses ip 192.168.0.100
His server to my laptop is connected with a cross over cable, his server
is 192.168.10.1
My Laptop is 192.168.10.42



From the laptop I can ping as far as the external nic on his server
(192.168.0.100). 
From his server I can ping the world.

I have googled, looked at the mailing list, but can not find the problem
:o( I have re installed the server, incase he goofed up, same problem, I
have swapped the external network card, same problem.

His Server rc.conf:
defaultrouter=192.168.0.1
gateway_enable=YES
hostname=osire.home.lan
ifconfig_fxp0=inet 192.168.0.100  netmask 255.255.255.0 #external nic
ifconfig_rl0=inet 192.168.10.1  netmask 255.255.255.0 #internal nic
inetd_enable=YES
saver=logo
sshd_enable=YES

osire# netstat -rn
Routing tables

Internet:
DestinationGatewayFlagsRefs  Use  Netif
Expire
default192.168.0.1UGS 00   fxp0
127.0.0.1  127.0.0.1  UH  0   49lo0
192.168.0  link#1 UC  00   fxp0
192.168.0.100:02:b3:99:46:d0  UHLW13   fxp0
1043
192.168.0.254  00:e0:29:9c:ea:72  UHLW0  165   fxp0
1039
192.168.10 link#2 UC  00rl0

Internet6:
Destination   Gateway   Flags
Netif Expire
::1   ::1   UH
lo0
fe80::%fxp0/64link#1UC
fxp0
fe80::2a0:c9ff:fe8e:3980%fxp0 00:a0:c9:8e:39:80 UHL
lo0
fe80::%rl0/64 link#2UC
rl0
fe80::240:f4ff:fe3c:9deb%rl0  00:40:f4:3c:9d:eb UHL
lo0
fe80::%lo0/64 fe80::1%lo0   U
lo0
fe80::1%lo0   link#4UHL
lo0
ff01::/32 ::1   U
lo0
ff02::%fxp0/32link#1UC
fxp0
ff02::%rl0/32 link#2UC
rl0
ff02::%lo0/32 ::1   UC
lo0
osire#

There is no firewall or natd running on his server


My Server rc.conf:

Generated by Katinka 16-07-03

amd_enable=NO
gateway_enable=YES
hostname=webserver.kaqelectronics.dyndns.org
ifconfig_fxp0=inet 192.168.0.1  netmask 255.255.255.0
ifconfig_rl0=media 10baseT/UTP up
ipv6_enable=NO
kern_securelevel_enable=NO
portmap_enable=YES
nfs_server_enable=YES
mountd_flags=-r
inetd_enable=YES
nfs_reserved_port_only=YES
saver=logo
scrnmap=NO
sendmail_enable=YES
sshd_enable=YES
tcp_extensions=YES
usbd_enable=YES
firewall_enable=YES
firewall_type=OPEN
named_enable=YES
named_flags=/etc/namedb/named.conf
sasl_saslauthd_enabled=YES
ppp_enable=YES
ppp_profile=dialup
ppp_mode=ddial


webserver# netstat -rn
Routing tables

Internet:
DestinationGatewayFlagsRefs  Use  Netif
Expire
default203.30.44.55   UGSc   1532442   tun0
127.0.0.1  127.0.0.1  UH  0 7361lo0
192.168.0  link#2 UC  50   fxp0
192.168.0.6link#2 UHLW1 4155   fxp0
192.168.0.10   00:e0:18:b0:53:00  UHLW2   165561   fxp0
944
192.168.0.100  00:a0:c9:8e:39:80  UHLW13   fxp0
845
192.168.0.254  00:e0:29:9c:ea:72  UHLW2   569747   fxp0
841
192.168.0.255  ff:ff:ff:ff:ff:ff  UHLWb   2 2578   fxp0
203.30.44.55   202.89.160.14  UH 160   tun0
webserver#


I am out of ideas

Regards,

Kat.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.593 / Virus Database: 376 - Release Date: 20/02/2004
 

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


RE: 5.2 install hangs after menu

2004-02-10 Thread Kathy Quinlan


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Dimitri Aivaliotis
 Sent: Monday, 9 February 2004 11:44 PM
 To: [EMAIL PROTECTED]
 Subject: Re: 5.2 install hangs after menu
 
 
 On Mon, 9 Feb 2004 23:26:51 +0800
 Kathy Quinlan [EMAIL PROTECTED] wrote:
 
 
If I select option 5 (verbose debug) it gives the 
 following error
message:
ACPI autoload failed - no such file or directory.

   
   
   Have you tried option 2 (no ACPI)?
  
  Yeap, only option that does not hang is 6, but it would if 
 I sent it 
  back on its way lol
  
 
 Can you give more debug info?  The kernel prints out copious 
 messages to the screen when it's loading.  If they go by too 
 quickly to catch, you can press Scroll-Lock, and then either 
 use the arrow keys or the PageUp/PageDown keys to navigate.
 
 It'll be quite a lot of typing, unless you're booting from a 
 serial console and can copy-paste.
OK here is the info I get:

After the menu, and the kernel load:
loading required module 'pci'
ACPI autoload failed - no such file or directory
\
int= 0006 err=  efl=0001 0896 eip=8903 8b08
eax=  ebx=0043 af10 ecx= 003f edx= 
esi=000b e1e8 edi=0005 8a65 ebp=0009 48a0 esp=0009 e858
cs=0008 ds=0010 es=0010 fs=0010 gs=0010 ss=0010
cs:eip= ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff
ss:esp= df af 43 00 10 af 43 00-e8 e1 06 00 00 08 00 80
75 00 00 a0 00 00 00 00-00 00 00 00 00 00 00 00

BTX halted

That is all I get sofar.

Regards,

Kat.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.580 / Virus Database: 367 - Release Date: 6/02/2004
 

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


RE: 5.2 install hangs after menu -- USB ISSUES

2004-02-10 Thread Kathy Quinlan


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Dimitri Aivaliotis
 Sent: Tuesday, 10 February 2004 9:06 PM
 To: [EMAIL PROTECTED]
 Subject: Re: 5.2 install hangs after menu
 
 
 On Tue, 10 Feb 2004 17:47:27 +0800
 Kathy Quinlan [EMAIL PROTECTED] wrote:
 
  OK here is the info I get:
  
  After the menu, and the kernel load:
  loading required module 'pci'
  ACPI autoload failed - no such file or directory
  \
  int= 0006 err=  efl=0001 0896 eip=8903 8b08 
 eax=  
  ebx=0043 af10 ecx= 003f edx=  esi=000b e1e8 
 edi=0005 8a65 
  ebp=0009 48a0 esp=0009 e858 cs=0008 ds=0010 es=0010 fs=0010 gs=0010 
  ss=0010 cs:eip= ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff
  ff ff ff ff ff ff ff ff-ff ff ff ff ff ff ff ff
  ss:esp= df af 43 00 10 af 43 00-e8 e1 06 00 00 08 00 80
  75 00 00 a0 00 00 00 00-00 00 00 00 00 00 00 00
  
  BTX halted
  
  That is all I get sofar.
  
 
 Google ist your friend:
 
 Searching for FreeBSD ACPI autoload failed - no such file or 
 directory yielded:
 

OK this was all a red herring :o(

The fault turned out to be that in BIOS I had USB support for legacy
KBD/MOUSE/FDD enabled.

Then the installer hung while I had an ATMEL USB development board
plugged in, and also a MGE USB UPS.

So it looks like the install loader hangs on USB devices that are not
generic (USB HP ScanJet 5200C, Aopen optical USB mouse and M$ USB
keyboard are ok)

Installing the 5.2 Boot Loader trashed Win XP, but a rebuild fixed win
XP with no loss of data (but I had the data backed up anyway) and I
installed GAG boot loader so I could dual boot.

Everything seems to be running sweet now :o)

Regards,

Kat.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.580 / Virus Database: 367 - Release Date: 6/02/2004
 

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


5.2 install hangs after menu

2004-02-09 Thread Kathy Quinlan
I am trying to install FreeBSD5.2 on an Athlon XP 2100+ machine with
512Mb ram and 20gb hdd (5gb partition for FreeBSD)MSI 745 Ultra
motherboard.

If I select any option on the menu, it tries to install and then hangs
saying BTX halted. Even if I use option 3 (safe mode)

If I select option 5 (verbose debug) it gives the following error
message:
ACPI autoload failed - no such file or directory.

Any help is appreciated, as google has turned up nothing :(

Regards,

Kat.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.580 / Virus Database: 367 - Release Date: 6/02/2004
 

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


RE: 5.2 install hangs after menu

2004-02-09 Thread Kathy Quinlan


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Dimitri Aivaliotis
 Sent: Monday, 9 February 2004 11:18 PM
 To: [EMAIL PROTECTED]
 Subject: Re: 5.2 install hangs after menu
 
 
 On Mon, 9 Feb 2004 23:05:09 +0800
 Kathy Quinlan [EMAIL PROTECTED] wrote:
 
 
  If I select option 5 (verbose debug) it gives the following error
  message:
  ACPI autoload failed - no such file or directory.
  
 
 
 Have you tried option 2 (no ACPI)?

Yeap, only option that does not hang is 6, but it would if I sent it
back on its way lol

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.580 / Virus Database: 367 - Release Date: 6/02/2004
 

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


RE: Gateway traffic reporting tool (port)

2003-11-08 Thread Kathy Quinlan


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Jason C. Wells
 Sent: Sunday, 9 November 2003 7:44 AM
 To: Augusto Jun Devegili
 Cc: [EMAIL PROTECTED]
 Subject: Re: Gateway traffic reporting tool (port)
 
 
 You can easily use count rules in ipfw for this.  I did this 
 back when I had a roommate who was a pornmeister.  The first 
 month that our DSL bill came in at plus $30, I started 
 counting.  He was using about 85% of our bandwidth.
 
 Later,
 Jason C. Wells

OK, I have this problem too.

I have a few questions, IPFW shows the result as packets right ? And not
all packets are equal ?  How do I get the information as human readable
?

If I am wrong please correct me, it is the only way we learn.

Regards,

Kat.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.530 / Virus Database: 325 - Release Date: 22/10/2003
 

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