Re: FreeBSD Support for Fibre Channel Devices

2010-07-12 Thread Anton Shterenlikht
On Mon, Jul 12, 2010 at 03:06:03PM -0700, Tim Gustafson wrote:
> > isp(4)
> > mpt(4)
> 
> Hrmm, I guess I should phrase the question this way:
> 
> I have installed a Fibre Channel card into a new FreeBSD 8.x box.  I have 
> both isp(4) and mpt(4) are loaded and the device still doesn't appear in 
> /dev.  pciconf shows:
> 
> no...@pci0:8:1:0: class=0x0c0400 card=0x656c1242 chip=0x15601242 rev=0xb2 
> hdr=0x00
>  vendor   = 'Jaycor Networks Inc'
>  device   = 'Dual Channel 2 Gb/s Fibre Channel-PCI-X (JNIC-1560)'
>  class= serial bus
>  subclass = Fibre Channel
> 
> So I'm guessing that this device is unsupported.  So, what I was trying to 
> ascertain from my original question is: does anyone have any FreeBSD 
> experience with a Fibre Channel card that they like under FreeBSD that I can 
> replace this one with?
> 
> Basically I'm asking for a recommendation along the lines of "I have card X 
> and it works beautifully".  :)

I have X card and it workd beautifully.

On ia64 -current I have:

i...@pci0:192:1:0:  class=0x0c0400 card=0x12d6103c chip=0x24221077 rev=0x02 
hdr=0x00
vendor = 'QLogic Corporation'
device = 'QLogic PCI to Fibre Channel Host Adapter for QLA2460 
(ISP2422)'
class  = serial bus
subclass   = Fibre Channel

which gives:

da1 at isp0 bus 0 scbus2 target 0 lun 1
da1:  Fixed Direct Access SCSI-4 device 
da1: 200.000MB/s transfers WWNN 0x500805f3000ec220 WWPN 0x500805f3000ec221 
PortID 0x1
da1: Command Queueing enabled
da1: 69460MB (142255575 512 byte sectors: 255H 63S/T 8855C)
da2 at isp0 bus 0 scbus2 target 0 lun 2
da2:  Fixed Direct Access SCSI-4 device 
da2: 200.000MB/s transfers WWNN 0x500805f3000ec220 WWPN 0x500805f3000ec221 
PortID 0x1
da2: Command Queueing enabled
da2: 69460MB (142255575 512 byte sectors: 255H 63S/T 8855C)

As you can see my disk array is Compaq MSA1000.


-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
___
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: cron_flags in jails rc.conf

2010-07-12 Thread Adam Vande More
On Mon, Jul 12, 2010 at 10:22 PM, Fbsd8  wrote:

> I found this statement in the rc.conf file of a jail.
> cron_flags="$cron_flags -J 15"
>
> I checked the cron manpage and found info on this.
>
> The -J 15 is the range cron is to sleep before launching the cron jobs for
> the superuser.  The -j option does the same thing for non-superuser jobs.
>
> Looking at the system's /etc/crontab file are those superuser jobs?
>

Yes

Also is the above rc.conf statement coded correctly?
>

can't to say without seeing what $cron_flags was set to, but mostly likely
yes.

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


cron_flags in jails rc.conf

2010-07-12 Thread Fbsd8

I found this statement in the rc.conf file of a jail.
cron_flags="$cron_flags -J 15"

I checked the cron manpage and found info on this.

The -J 15 is the range cron is to sleep before launching the cron jobs 
for the superuser.  The -j option does the same thing for non-superuser 
jobs.


Looking at the system's /etc/crontab file are those superuser jobs?

Also is the above rc.conf statement coded correctly?
___
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"


D-Link DWA-556 and hostap

2010-07-12 Thread Nathan Lay

Hi list,
I read that the D-Link DWA-556 uses the AR5008 chipset.  Anyone using 
it?  Does it work well for hostap (at least for 11g)?  I'm a bit unsure 
because I've read that AR5008 has hardware bugs.  However, I am a fan of 
ath(4) ... it has served me well in the past.  However, I'm considering 
building a Mini ITX system that has only one PCI-E x4 slot.  My choices 
seem to be DWA-556 (AR5008) and Asus PCE-N13 (RT2860), both of which are 
PCI-E x1 cards.


How about Marvell-based wireless cards (mwl(4))?  I haven't been able to 
find any card with a Marvell chipset in it!


Best Regards,
Nathan Lay
___
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: [kde-freebsd] How to kill process if X is frozen during fancy KDE4 windows effects?

2010-07-12 Thread Yuri

On 07/12/2010 18:25, Mina R Waheeb wrote:
This sounds like new HD vega cards, I think you need to track the 
logs. or provide any information that maybe could help to identify the 
problem. I had almost the same problem with my ATI HD card, with the 
latest update of XORG and -CURRENT it just working fine (with visual 
effects enabled). In most of the cases happended to me the vega card 
totally hang the mouse still move but it not responding to repaint 
anything so you can't event switch to terminal. So if you have some 
luck hit the power button and wait the machine to shutdown or just 
disable the visual effects :)

Regards,
Mina R Waheeb


It's not Vega card, it's 9400GT card.

I had this happen to me at least 3 times over the last 6 months. But 
killing the process always helps. Luckily I have another hosts on my net.


Yuri
___
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: [kde-freebsd] How to kill process if X is frozen during fancy KDE4 windows effects?

2010-07-12 Thread Mina R Waheeb
This sounds like new HD vega cards, I think you need to track the logs. or
provide any information that maybe could help to identify the problem. I had
almost the same problem with my ATI HD card, with the latest update of XORG
and -CURRENT it just working fine (with visual effects enabled). In most of
the cases happended to me the vega card totally hang the mouse still move
but it not responding to repaint anything so you can't event switch to
terminal. so if you have some luck hit the power button and wait the machine
to shutdown or just disable the visual effects :)

Regards,
Mina R Waheeb

On Mon, Jul 12, 2010 at 11:47 PM, Yuri  wrote:

> I run KDE4 with nvidia card. KDE4 desktop effects are on, so when window
> comes back from the icon it goes through some motion slowly blowing out
> from the icon.
>
> Very rarely, but screen freezes during such motion. Mouse still moves,
> window that was blowing out of the icon stays in the shape of curved
> triangle. Keyboard is frozen, Ctrl-Alt-FN doesn't switch to black
> terminal. I can only connect to the host from outside and kill the
> unfortunate X-client that caused the hang. After this it works just fine
> again.
>
> My question is: what to do if there is no other host on the net? How to
> kill the process?
>
> Yuri
> ___
> kde-freebsd mailing list
> kde-free...@kde.org
> https://mail.kde.org/mailman/listinfo/kde-freebsd
> See also http://freebsd.kde.org/ for latest information
>
___
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 check for sufix g or m on size field

2010-07-12 Thread Aiza

Anonymous wrote:

Aiza  writes:


Have a .sh script that accepts an -s sparse file size.
Only 2 suffix's are valid m and g.

Been trying to get this line of code to strip out just the single
letter. But it strips the letter and every thing to the right of it.

Timagesize=`echo-n "${imagesize}" | sed 's/g.*$//'`


You didn't state what's your input. I guess smth like following will do

  strip() {
  local size=
  if printf >&- 2>&- %g ${size:=${1%[gm]}}; then
  echo "it's a \`$size' without suffix"
  else
  echo "$1 has invalid suffix"
  fi
  }

  $ strip 17m
  it's a `17' without suffix
  $ strip 33g
  it's a `33' without suffix
  $ strip 25gm
  25gm has invalid suffix



This is real close but it allows a numeric value through as valid which 
is not a valid condition. The $size value has to be suffixed with g or m 
to be valid. A numeric value only or a numeric value suffixed with 
anything else than m or g is invalid.

___
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: FreeBSD Support for Fibre Channel Devices

2010-07-12 Thread Tim Gustafson
> isp(4)
> mpt(4)

Hrmm, I guess I should phrase the question this way:

I have installed a Fibre Channel card into a new FreeBSD 8.x box.  I have both 
isp(4) and mpt(4) are loaded and the device still doesn't appear in /dev.  
pciconf shows:

no...@pci0:8:1:0: class=0x0c0400 card=0x656c1242 chip=0x15601242 rev=0xb2 
hdr=0x00
 vendor   = 'Jaycor Networks Inc'
 device   = 'Dual Channel 2 Gb/s Fibre Channel-PCI-X (JNIC-1560)'
 class= serial bus
 subclass = Fibre Channel

So I'm guessing that this device is unsupported.  So, what I was trying to 
ascertain from my original question is: does anyone have any FreeBSD experience 
with a Fibre Channel card that they like under FreeBSD that I can replace this 
one with?

Basically I'm asking for a recommendation along the lines of "I have card X and 
it works beautifully".  :)

Tim Gustafson
Baskin School of Engineering
UC Santa Cruz
t...@soe.ucsc.edu
831-459-5354
___
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: What chipset is the Asus PCE-N13?

2010-07-12 Thread Nathan Lay

On 07/12/10 06:03, Jerry wrote:

On Sun, 11 Jul 2010 19:20:46 -0400
Nathan Lay  articulated:


   

Hi list,
I can't seem to find anything about this wireless adapter.  I am
thinking about building a mini ITX multipurpose router/thingy and this
card is cheap and it appears it would fit in the PCIE x4 slot on the ITX
board I'm thinking of getting.  I've read somewhere that it's RT2800 but
I want to be sure.  I see CURRENT supports Asus USB-N13 with it's run(4)
driver.  Looks like I'm SOL on this one.

If it is supported on FreeBSD, then I need to check if I can run hostap
with it (and if it runs well) ...
 



Specifications
Network StandardIEEE 802.11b/g/n
Interface   PCI Express BUS Management Interface
Antenna 2 RP SMA JACK RF connectors
Operating Frequency 2.4 GHz
Operation Channel   11 for N. America, 14 Japan, 13 Europe (ETSI)
Data Rate   * 801.11g: 6, 9, 12, 18, 24, 36, 48, 54Mbps
* 802.11b: 1, 2, 5.5, 11Mbps
* 802.11n: downlink up to 300Mbps, uplink up to 
150Mbps(20/40MHz)

Output Power* 18dBm(b mode)
* 15~18dBm(g mode)
* 13~16dBm(n mode)

Modulation  64QAM, 16QAM, QPSK, BPSK, CCK, DQPSK, DBPSK, OFDM, DSSS
Management  Software AP(Win XP&  Vista only)
Xlink Kai( Win XP&  Mac OS only)
Utilities   

 * Mobile control center - Integrate all tools and indicate real time 
status information on system tray
 * Wireless setting - Diagnose and configure your wireless network settings 
with on-line trouble shooting feature
 * Mobile manager - Support automatic roaming and network reconfiguration 
between different locations
 * Site survey - Explore your wireless networking topology through a handy 
way
 * WPS Wizard - High-speed wireless network is just a few clicks away

Security64-bit/128-bit WEP, TKIP, and AES WI-Fi alliance WPA, WPA2
Certifications  FCC, CE, IC
Physical Specifications Dimensions: 69.7 x 122 x 4.6 mm (not including the size 
of Antenna)
Weight:78g
Environmental Specification Operating Temperature: 0°C to 40°C (32°F to 
104ºF)
Storage Temperature: -20° to 70° C (-4°F to 158°F)
Operating Humidity: 10% to 90% RH (Non-condensing)
Storage Humidity: 5% to 95% RH (Non-condensing)
OS Support  Windows 7, Vista, XP, 2000, Linux Kernel 2.6.29 (Support Ubuntu 
2.6 only)
Package Contents

 * Wireless LAN Adapter *1
 * Support CD *1
 * Dipole Antenna *2
 * Warranty card *1
 * Low Profile Bracket *1


This supports the 'N' standard so finding a fully functioning FreeBSD
driver for it are is probably not possible at this point in time.
FreeBSD has virtually no "n" specification driver support.

I have a request into their support staff requesting the chip info. I
have had success in the past in getting a reply back from them usually
within 48 hours or less. By the way, did you also contact them
requesting that info?

   

No, should I request it?  Would that help?

mwl(4) supports Wireless N.  Unfortunately, that Asus card is the only 
card I can find that can fit in the Mini ITX system I have in mind.


Best Regards,
Nathan Lay
___
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: FreeBSD Support for Fibre Channel Devices

2010-07-12 Thread Matthew Seaman
On 12/07/2010 22:49:51, Tim Gustafson wrote:

> Can anyone recommend a FreeBSD-compatible fibre channel board to
> connect a FreeBSD 8.0 server to a Sun 3500 disk array?

isp(4)
mpt(4)

... which is basically what shows up on doing 'man -k fibre'

Cheers,

Matthew

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



signature.asc
Description: OpenPGP digital signature


FreeBSD Support for Fibre Channel Devices

2010-07-12 Thread Tim Gustafson
Hi,

Can anyone recommend a FreeBSD-compatible fibre channel board to connect a 
FreeBSD 8.0 server to a Sun 3500 disk array?

Tim Gustafson
Baskin School of Engineering
UC Santa Cruz
t...@soe.ucsc.edu
831-459-5354

___
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 kill process if X is frozen during fancy KDE4 windows effects?

2010-07-12 Thread Yuri
I run KDE4 with nvidia card. KDE4 desktop effects are on, so when window 
comes back from the icon it goes through some motion slowly blowing out 
from the icon.


Very rarely, but screen freezes during such motion. Mouse still moves, 
window that was blowing out of the icon stays in the shape of curved 
triangle. Keyboard is frozen, Ctrl-Alt-FN doesn't switch to black 
terminal. I can only connect to the host from outside and kill the 
unfortunate X-client that caused the hang. After this it works just fine 
again.


My question is: what to do if there is no other host on the net? How to 
kill the process?


Yuri
___
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: sort: write error with portsnap

2010-07-12 Thread Jakub Lach


andrew clarke-3 wrote:
> 
> Same here.  No idea why!
> 

I think this issue would have got more attention on freebsd-stable.

regards, 
- Jakub Lach
-- 
View this message in context: 
http://old.nabble.com/sort%3A-write-error-with-portsnap-tp29105763p29143811.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
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: building an ISO

2010-07-12 Thread Manolis Kiagias
On 12/07/2010 9:51 μ.μ., Sam Fourman Jr. wrote:
> On Mon, Jul 12, 2010 at 12:51 PM, Ryan Perry  wrote:
>   
>> I need to make my own FreeBSD installer CD that installs 2 ports, and then
>> runs some custom scripts.  What are the best methods to accomplish this?
>> 
> I was also wondering if there is a way to make release without using a cvs 
> tag?
>
> eg.. I want to use the /usr/src from my machine
>
>
>   
The quick answer is yes:

make release CHROOTDIR=/data/release \
BUILDNAME=7.1-PRERELEASE \
CVSROOT=/data/ncvs \
EXTSRCDIR=/usr/src \
-DNODOC -DNOPORTS \
-DNO_FLOPPIES \
-DMAKE_ISOS

Note the EXTSRCDIR that points to /usr/src. You still have to supply
CVSROOT which need not exist, and will not be used
___
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: Staying up to date with security patches

2010-07-12 Thread Michael

On 02/07/2010 22:58, Mike Clarke wrote:

On Friday 02 July 2010, Ed Flecko wrote:


Since I will be doing a custom kernel at some point, I won't use
freebsd-update, I'm using cvsup instead.


The alternative would be to just use the source code patches from the
security-advisories mailing list. That way you don't have to rebuild
the whole base system each time, though some of the patches will
require the kernel to be rebuilt.



That's what I used to do and it works. Only trouble is that in some 
cases it turns out that it's not enough to simply follow instructions 
from security advisory. You have to manually make other parts of the 
system otherwise updating will fail. I found it somewhat confusing and 
time consuming.


Now I'm using freebsd-update with my custom built kernel and it also 
works fine. I just have to remember to rebuild and reinstall my kernel 
every time after using freebsd-update (or in fact only when kernel code 
is affected). That way I got very quick and no-brainer system updates.

Is it not advised to do it this way?

Michael
___
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: building an ISO

2010-07-12 Thread Sam Fourman Jr.
On Mon, Jul 12, 2010 at 12:51 PM, Ryan Perry  wrote:
> I need to make my own FreeBSD installer CD that installs 2 ports, and then
> runs some custom scripts.  What are the best methods to accomplish this?

I was also wondering if there is a way to make release without using a cvs tag?

eg.. I want to use the /usr/src from my machine


-- 

Sam Fourman Jr.
Fourman Networks
http://www.fourmannetworks.com
___
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"


building an ISO

2010-07-12 Thread Ryan Perry
I need to make my own FreeBSD installer CD that installs 2 ports, and then
runs some custom scripts.  What are the best methods to accomplish this?
___
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: Wacom tablet driver port doesn't seem to work

2010-07-12 Thread Chip Camden
Quoth Chad Perrin on Sunday, 11 July 2010:
> I started working on getting FreeBSD running on a ThinkPad X60 this
> weekend.  My goal was to get everything up to the standards of my T60,
> plus touchscreen and pen support for the Wacom display.  The only problem
> I've encountered so far is the fact that when I tried installing the
> Wacom driver from ports, it did not seem to work as advertised.
> 
> port:
> 
> /usr/ports/x11-drivers/input-wacom
> 
> result:
> 
> The driver file will not load and, indeed, does not appear to exist
> anywhere on the system.
> 
> There are no files with "wacom" in the name and a ".ko" filename
> extension on the system, anywhere, after installing the input-wacom port.
> Is there some other step I'm meant to take?  I've searched all over the
> Web for something relevant, and have found nothing to shed light on the
> situation.  Is the driver file named something more cryptic than what I'm
> trying to find (maybe a driver file that doesn't contain the string
> "wacom" in the name)?
> 
> Any guidance would be appreciated.  The FreeBSD version on the X60 is
> 8.0-RELEASE.
> 
> -- 
> Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


Looks like this may be it:

/usr/local/lib/xorg/modules/input/wacom_drv.so


-- 
Sterling (Chip) Camden| sterl...@camdensoftware.com | 2048D/3A978E4F
http://camdensoftware.com | http://chipstips.com| http://chipsquips.com


pgp4euqj6eHQH.pgp
Description: PGP signature


Re: .sh check for sufix g or m on size field

2010-07-12 Thread Chip Camden
Quoth Aiza on Monday, 12 July 2010:
> Sorry miss send, was not done yet.
> 
> Have a .sh script that accepts an -s sparse file size.
> Only 2 suffix's are valid m and g.
> 
> Been trying to get this line of code to strip out just the single 
> letter. But it strips the letter and every thing to the right of it.
> 
> Timagesize=`echo-n "${imagesize}" | sed 's/g.*$//'`
> 
> I plan to strip just the m or g if its there and the result should be 
> numeric. If not numeric know invalid suffix.
> 
> Need help with the sed syntax. Or if there is better way I want to learn 
> it.
> 
> Thanks
> ___
> 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"

It sounds like what you want is simply:

sed 's/[gm]//'

Or am I missing something?

-- 
Sterling (Chip) Camden| sterl...@camdensoftware.com | 2048D/3A978E4F
http://camdensoftware.com | http://chipstips.com| http://chipsquips.com


pgpDDzND6NDjl.pgp
Description: PGP signature


Re: Har

2010-07-12 Thread ill...@gmail.com
On 11 July 2010 09:07, 001  wrote:
> My hdd is using UDMA33 under PC-BSD (which uses a FreeBSD kernel). The
> Nvidia SATA chipset seems to be detected, but isn't used! I hope this
> is easily solvable because my laptop becomes really slow when the hdd
> is used now.

It appears from here that on 8.1-RC2 the SATA driver
is used in preference to the old ATA interface, 8.0
seems to do the opposite.

Try kldloading ataahci & ahci (& maybe siis) & seeing
if it is probed correctly.

-- 
--
___
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 check for sufix g or m on size field

2010-07-12 Thread John Webster

--On July 12, 2010 10:29:08 PM +0800 Aiza  wrote:

> Sorry miss send, was not done yet.
> 
> Have a .sh script that accepts an -s sparse file size.
> Only 2 suffix's are valid m and g.
> 
> Been trying to get this line of code to strip out just the single letter. But 
> it strips the letter and every thing to the right of it.
> 
> Timagesize=`echo-n "${imagesize}" | sed 's/g.*$//'`
> 
> I plan to strip just the m or g if its there and the result should be 
> numeric. If not numeric know invalid suffix.
> 
> Need help with the sed syntax. Or if there is better way I want to learn it.
> 
> Thanks

Is this what you want?

sed -n 's/^\([0-9]\{1,\}[gm]\)$/\1/p'

Prints output only if the input begins with digits and ends with g or m.

Or this?

sed -n 's/^\([0-9]\{1,\}\)[gm]$/\1/p'

Prints numeric output only if the input begins with digits and ends with g 
or m.






pgp0dDi9HpJYK.pgp
Description: PGP signature


Re: .sh check for sufix g or m on size field

2010-07-12 Thread Anonymous
Aiza  writes:

> Have a .sh script that accepts an -s sparse file size.
> Only 2 suffix's are valid m and g.
>
> Been trying to get this line of code to strip out just the single
> letter. But it strips the letter and every thing to the right of it.
>
> Timagesize=`echo-n "${imagesize}" | sed 's/g.*$//'`

You didn't state what's your input. I guess smth like following will do

  strip() {
  local size=
  if printf >&- 2>&- %g ${size:=${1%[gm]}}; then
  echo "it's a \`$size' without suffix"
  else
  echo "$1 has invalid suffix"
  fi
  }

  $ strip 17m
  it's a `17' without suffix
  $ strip 33g
  it's a `33' without suffix
  $ strip 25gm
  25gm has invalid suffix

>
> I plan to strip just the m or g if its there and the result should be
> numeric. If not numeric know invalid suffix.
>
> Need help with the sed syntax. Or if there is better way I want to
> learn it.
___
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 check for sufix g or m on size field

2010-07-12 Thread Aiza

Sorry miss send, was not done yet.

Have a .sh script that accepts an -s sparse file size.
Only 2 suffix's are valid m and g.

Been trying to get this line of code to strip out just the single 
letter. But it strips the letter and every thing to the right of it.


Timagesize=`echo-n "${imagesize}" | sed 's/g.*$//'`

I plan to strip just the m or g if its there and the result should be 
numeric. If not numeric know invalid suffix.


Need help with the sed syntax. Or if there is better way I want to learn 
it.


Thanks
___
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 check for sufix g or m on size field

2010-07-12 Thread Aiza

Have a .sh script that accepts an -s sparse file size
Only 2 suffix's are valid m and g.

Been trying to get this line of code to just strip out just the single 
letter. But it strips the letter and every thing to the right of it.


Timagesize=`echo-n "${imagesize}" | sed 's/g.*$//'`

I plan to strip just the m or g if its there and the result shouls be j
___
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: Headphone output doesn't work with NVidia MCP78 High Definition Audio Controller

2010-07-12 Thread Pieter de Goeje
On Sunday 11 July 2010 15:14:30 001 wrote:
> I use a laptop with PC-BSD and couldn't get output over the headphone.
> The built-in speakers of the laptop work fine and keep working even
> when a headphone is plugged in (whereas on Windows they get muted). I
> tried every slider and switch in KMix, but nothing enables sound over
> the headphone.
> 
> This is my dmesg output:
> pcm0:  at cad 0 nid 1 on
> hdac0
> pcm1:  at cad 0 nid 1 on
> hdac0
> pcm2:  at cad 3 nid 1 on hdac0

By default FreeBSD plays audio on the first pcm device. You can use a 
different device by setting the sysctl hw.snd.default_unit. If I wanted to 
play audio on pcm1 I could set sysctl hw.snd.default_unit=1. In your case I 
would try setting: hw.snd.default_unit=1

- Pieter
___
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 setenv using Bourne .sh

2010-07-12 Thread krad
You could do an echo $SHELL

On 7/11/10, Bernt Hansson  wrote:
> 2010-07-11 01:08, Aiza skrev:
>> Polytropon wrote:
>>> On Sat, 10 Jul 2010 11:43:13 +, "b. f."
>>> wrote:
 Polytropon wrote:
 On Sat, 10 Jul 2010 10:53:17 +0800, Aiza  wrote:
>> Trying the set the pkg_add environment variable PKGDIR using this
>>
>>
>> setenv PKGDIR="/usr/packages"  and get this error message
>> setenv: Syntax Error.
> Of course. The sh shell doesn't have setenv.
 It looks like he is actually using csh, because in the Bourne shell
 issuing that command usually yields "setenv: not found".  His problem
 is that, unlike "export",  setenv doesn't take an "=" between the
 variable and the value to be assigned to it.  See csh(1).
>>>
>>> Yes, you're right of course, I didn't notice that. The correct
>>> syntax for the setenv command in the C shell is
>>>
>>> setenv VAR "value"
>>>
>>>
>>>
 When you are directed to builtin(1), it usually means that you should
 refer to the manpage(s) of the shell that you are using for the
 information that you need.
>>>
>>> That's why I suggested looking at csh's manpage. :-(
>>>
>>
>>
>> I am using root and have a pristine install on freebsd 8.0 so what ever
>> the default shell for root is, is what I am using.
>
> It's csh then.
> ___
> 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"
>

-- 
Sent from my mobile device
___
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"


any effort to use bsd libc on Linux?

2010-07-12 Thread Joe Dai
Or expand bionic to full set bsd libc? Thanks for help.
joe
___
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: [6.3] Get e-mail when CTRL-ALT-DEL is used?

2010-07-12 Thread Gilles
On Thu, 08 Jul 2010 14:29:59 +0400, ait  wrote:
>Maybe you can use the /etc/rc.shutdown script, there's a line at the end 
>of it:

Thanks everyone for the 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"


HW recommendation

2010-07-12 Thread Vladimir Kushnir

Hi!

Please folks, I need some help. I'm in desperate need to upgrade my 
AMD64 (s939) box - need much more CPU/RAM power to do both CPU- 
and memory-intensive computations.
So here is my obvious question: which are the last supported chipsets/CPU 
and so on (I'm thinking along the line of AM3 AMD-based MB plus Phenom II 
- they seem to be a bit cheeper)? Is there any sence to look for the 
newest (AMD8xx) based MB, 6-core Phenoms, SATA III, USB-3 or they aren't 
going to work?


TIA,
Vladimir
___
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: What chipset is the Asus PCE-N13?

2010-07-12 Thread Jerry
On Sun, 11 Jul 2010 19:20:46 -0400
Nathan Lay  articulated:


> Hi list,
> I can't seem to find anything about this wireless adapter.  I am 
> thinking about building a mini ITX multipurpose router/thingy and this 
> card is cheap and it appears it would fit in the PCIE x4 slot on the ITX 
> board I'm thinking of getting.  I've read somewhere that it's RT2800 but 
> I want to be sure.  I see CURRENT supports Asus USB-N13 with it's run(4) 
> driver.  Looks like I'm SOL on this one.
> 
> If it is supported on FreeBSD, then I need to check if I can run hostap 
> with it (and if it runs well) ...



Specifications
Network StandardIEEE 802.11b/g/n
Interface   PCI Express BUS Management Interface
Antenna 2 RP SMA JACK RF connectors
Operating Frequency 2.4 GHz
Operation Channel   11 for N. America, 14 Japan, 13 Europe (ETSI)
Data Rate   * 801.11g: 6, 9, 12, 18, 24, 36, 48, 54Mbps
* 802.11b: 1, 2, 5.5, 11Mbps
* 802.11n: downlink up to 300Mbps, uplink up to 
150Mbps(20/40MHz)

Output Power* 18dBm(b mode)
* 15~18dBm(g mode)
* 13~16dBm(n mode) 

Modulation  64QAM, 16QAM, QPSK, BPSK, CCK, DQPSK, DBPSK, OFDM, DSSS
Management  Software AP(Win XP & Vista only)
Xlink Kai( Win XP & Mac OS only)
Utilities   

* Mobile control center - Integrate all tools and indicate real time status 
information on system tray
* Wireless setting - Diagnose and configure your wireless network settings 
with on-line trouble shooting feature
* Mobile manager - Support automatic roaming and network reconfiguration 
between different locations
* Site survey - Explore your wireless networking topology through a handy 
way
* WPS Wizard - High-speed wireless network is just a few clicks away

Security64-bit/128-bit WEP, TKIP, and AES WI-Fi alliance WPA, WPA2
Certifications  FCC, CE, IC
Physical Specifications Dimensions: 69.7 x 122 x 4.6 mm (not including the size 
of Antenna)
Weight:78g
Environmental Specification Operating Temperature: 0°C to 40°C (32°F to 
104ºF)
Storage Temperature: -20° to 70° C (-4°F to 158°F)
Operating Humidity: 10% to 90% RH (Non-condensing)
Storage Humidity: 5% to 95% RH (Non-condensing)
OS Support  Windows 7, Vista, XP, 2000, Linux Kernel 2.6.29 (Support Ubuntu 
2.6 only)
Package Contents

* Wireless LAN Adapter *1
* Support CD *1
* Dipole Antenna *2
* Warranty card *1
* Low Profile Bracket *1


This supports the 'N' standard so finding a fully functioning FreeBSD
driver for it are is probably not possible at this point in time.
FreeBSD has virtually no "n" specification driver support.

I have a request into their support staff requesting the chip info. I
have had success in the past in getting a reply back from them usually
within 48 hours or less. By the way, did you also contact them
requesting that info?

-- 
Jerry ✌
freebsd.u...@seibercom.net

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

The nice thing about standards
is that there are so many of them to choose from.

Andrew S. Tanenbaum
___
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: What chipset is the Asus PCE-N13?

2010-07-12 Thread Herbert J . Skuhra
On Sun, 11 Jul 2010 19:20:46 -0400 Nathan Lay wrote:

> Hi list,
> I can't seem to find anything about this wireless adapter.  I am 
> thinking about building a mini ITX multipurpose router/thingy and this 
> card is cheap and it appears it would fit in the PCIE x4 slot on the ITX 
> board I'm thinking of getting.  I've read somewhere that it's RT2800 but 
> I want to be sure.  I see CURRENT supports Asus USB-N13 with it's run(4) 
> driver.  Looks like I'm SOL on this one.

According to the Linux drivers available from asus.com it's a Ralink
RT2860. I think it's not yet officially supported.

But you can try:

http://repo.or.cz/w/ralink_drivers.git

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


Local cvs repository

2010-07-12 Thread Peter Boosten
Hi all,

I run a local cvs repository for year now, but since a couple of days I
get these on the clients:

Server message: Unknown collection "src-all"
Server message: Unknown collection "ports-all"


The result is that neither the source nor the ports will get updated.

The update script on the repository server always ends with 'Finished
successfully'.

Anyone an idea?

Peter
-- 
http://www.boosten.org
___
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"