Re: What do fifth entry of `ls -ld /` implies ?
On Mon, Nov 08, 2010 at 09:59:25PM +0800, Aaron Lewis wrote: Hi, I'm wondering what is the fifth entry of long format with ls -ld , which i've never cared much about. ls -ld /usr/bin drwxr-xr-x 2 root wheel 6656 Nov 3 02:21 /usr/bin What does 6656 implies here ? That's the size needed to store the directory node. Andreas
Re: 2-3 General Question
On Tue, Sep 21, 2010 at 09:51:48PM -0700, patrick keshishian wrote: On Tue, Sep 21, 2010 at 7:03 PM, LOL elvis4...@gmail.com wrote: [cut] Does openBSD has a boot manager like Grub or Boot0 for FreeBSD ? I don't think so. HTH, --patrick Grub 0.97 is in ports. See the sysutils/grub port (only for i386 tho). Andreas
Re: OpenBSD as a laptop OS
See FAQ http://www.openbsd.org/faq/faq1.html#Desktop I've been using OpenBSD (mostly on laptops) as my primary work station for eight years. I'm a software developer, and I don't do sound or video as part of my work. Also, I don't have any use for NTFS. Andreas On Fri, Jun 18, 2010 at 01:59:22PM +0200, Jean-Francois wrote: Hello All, I am thinking about changing my OS to OpenBSD on my laptop, which is standard x86. It would be used as internet browser, mail client, multimedia, pciture video , etc ... My question is simple, is OpenBSD convenient enough for a daily usage ? What are the experiences about that ? Just to be sure, as of today, is ntfs experimental or working, or not ? for read ? for r/w ? I will certainly do with gnome wm. I know such question might not be very convenient to answer, this is just to be sure I can peacefully back-up my data and reinstall freshly without worrying about anything but being using a great os. Thanks -- Andreas Kdhdri, Ensembl Software Developer European Bioinformatics Institute (EMBL-EBI) Wellcome Trust Genome Campus, Hinxton Cambridge CB10 1SD, United Kingdom
OpenMP with gcc4?
Hi list, With the move to gcc4, will we at some point also get OpenMP support? This seems to be broken at the moment: $ cat omp-test.c int main(void) { int i; int a[100]; #pragma omp parallel for for (i = 0; i 100; ++i) { a[i] = i*i; } return 0; } $ cc -fopenmp -o omp-test omp-test.c cc: libgomp.spec: No such file or directory $ cc -v Reading specs from /usr/lib/gcc-lib/amd64-unknown-openbsd4.7/4.2.1/specs Target: amd64-unknown-openbsd4.7 Configured with: OpenBSD/amd64 system compiler Thread model: posix gcc version 4.2.1 20070719 Kind regards, Andreas
Re: ntp log rotation
NTPD does its own rotating if you tell it to. See e.g. http://www.eecis.udel.edu/~mills/ntp/html/monopt.html Cheers, Andreas 2010/1/3 Lars Kotthoff li...@larsko.org: Hi list, is there any way to use newsyslog with ntpd (not the OpenBSD one) without having to restart it? Just rotating the log causes subsequent log messages to be lost and killing ntpd with SIGHUP causes it to exit. I've had a look at the manpages and on the interwebs, but didn't find anything. Thanks, Lars -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: material about magicpoint
Use Google: http://en.wikipedia.org/wiki/MagicPoint 2009/7/12 Paulo Manoel Mafra ma...@das.ufsc.br: Hello misc, I've installed the magicpoint presentation tool and I would like to know if there is any related book or complete user guide (in english, french or portuguese). The tool seems to be very simple and easy to use, but I would like to see what is possible to do with it. Any recommendation ? Thanks, Paulo. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: New lynx in base
Can't you just make a port out of it, or even install it locally in some place like /opt/bin? Andreas 2009/6/24 hebert Maia hirnk...@gmx.de: Hello misc Can someone tell me, how i can add lynx.2.8.6 into the OpenBSD base system (It would be nice, because this version of lynx supports ssl wildcart certs)? :)) -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: chown
find /data -type f -name *.dat | xargs chown user:group Cheers, Andreas 2009/6/4 Steve fivering...@yahoo.com.au: I am trying to use chown -R to selectively change permissions on files. A series of files are contained in many folders under the root data folder. No files are stored in the data folder itself. Running chown -R user:group /data/*.dat run from /data generates an error indicating no files match. If I move a .dat file into /data the ownership changes in that folder but not those below. chown -R user:group /data/* works as expected Is there a way to selectively change files recursively ? Thanks Need a Holiday? Win a $10,000 Holiday of your choice. Enter now.http://us.lrd.yahoo.com/_ylc=X3oDMTJxN2x2ZmNpBF9zAzIwMjM2MTY2MTMEdG1fZG1l Y2gDVGV4dCBMaW5rBHRtX2xuawNVMTEwMzk3NwR0bV9uZXQDWWFob28hBHRtX3BvcwN0YWdsaW5lB HRtX3BwdHkDYXVueg--/SIG=14600t3ni/**http%3A//au.rd.yahoo.com/mail/tagline/cre ativeholidays/*http%3A//au.docs.yahoo.com/homepageset/%3Fp1=other%26p2=au%26p 3=mailtagline -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: kernel freeze randomly
2009/2/25 Andreas Kahari andreas.kah...@gmail.com: 2009/2/25 Robert rob...@openbsd.pap.st: On Wed, 25 Feb 2009 13:36:16 + Andreas Kahari andreas.kah...@gmail.com wrote: Will disabling apmd solve this issue? I'm seeing freezes on my Lenovo X61s. The machine was stable for a few weeks (or so) until Theo backed out that backed-out commit on acpicpu.c on Monday (23rd). Andreas Try building kernel from -current. The backout of the backout is backed-out again, uhm here is the commit: CVSROOT: /cvs Module name: src Changes by: dera...@cvs.openbsd.org 2009/02/24 06:20:03 Modified files: sys/arch/amd64/amd64: est.c sys/dev/acpi : acpicpu.c Log message: back out est.c 1.8 and bring acpicpu.c all the way back to 1.47 because of hanging machines. backed out correctly this time, as pointed out by tedu. This leads to cpu0: unknown Enhanced SpeedStep CPU, msr 0x0617091f0600091f cpu0: using only highest and lowest power states cpu0: Enhanced SpeedStep 2400 MHz (1196 mV): speeds: 2400, 1600 MHz on my Thinkpad X200. Thats not quite right as expected, scince this removes some month of changes in this area. But the system didn't crash so far. I prefer that. - Robert That's exactly what I have as well in my dmesg with a kernel built from today's sources, well, almost: cpu0: unknown Enhanced SpeedStep CPU, msr 0x0615081906000615 cpu0: using only highest and lowest power states cpu0: Enhanced SpeedStep 1200 MHz (1036 mV): speeds: 1600, 1200 MHz With apmd enabled, I experienced a freeze just hours ago, so I reverted to a kernel built on the 19th. I'll disable apmd and I'll give the new kernel another go. Thanks, Andreas Ok, having run with apmd disabled for a number of days, the system hasn't frozen one single time. Andreas Full dmesg of kernel built this morning (sorry for any gmail cut-n-paste weirdness): OpenBSD 4.5-beta (GENERIC.MP) #53: Wed Feb 25 09:21:07 GMT 2009 [cut] -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: kernel freeze randomly
Will disabling apmd solve this issue? I'm seeing freezes on my Lenovo X61s. The machine was stable for a few weeks (or so) until Theo backed out that backed-out commit on acpicpu.c on Monday (23rd). Andreas 2009/2/13 Dan Harnett dan...@harnett.name: On Fri, Feb 13, 2009 at 11:46:37AM -0600, Marco Peereboom wrote: I think we have narrowed this down to acpicpu + apmd. Do you run both as well? Yes, I do. On Fri, Feb 13, 2009 at 11:42:34AM -0500, Dan Harnett wrote: On Wed, Feb 11, 2009 at 08:09:16PM +0100, Markus Bergkvist wrote: I get kernel freeze randomly on Compaq 6710b with -CURRENT synced today. It is best reproduced by keeping the system busy, such as building userland, but there are no guarantees. I've been running memtester and also memory and hd test in bios, no errors were found. I get no ddb or any other output on terminal, it just freezes up. What can I do to retrieve information so I can file a proper bug report? There is no DE-9 contact but the serial port is enabled in BIOS and I do have a uftdi-device, if that might be useful. Any help is appreciated. I'm seeing the same issue on any amd64 machine I've tried. The i386 snapshot from the same date works fine on the same machines. I'm not even able to invoke ddb from the console. I've been able to trigger it with a lot of disk activity (dd, scp or rsync of large files, etc). Sometimes they lock up immediately, sometimes it takes a fews minutes, but that always seems to trigger it for me. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: kernel freeze randomly
2009/2/25 Robert rob...@openbsd.pap.st: On Wed, 25 Feb 2009 13:36:16 + Andreas Kahari andreas.kah...@gmail.com wrote: Will disabling apmd solve this issue? I'm seeing freezes on my Lenovo X61s. The machine was stable for a few weeks (or so) until Theo backed out that backed-out commit on acpicpu.c on Monday (23rd). Andreas Try building kernel from -current. The backout of the backout is backed-out again, uhm here is the commit: CVSROOT: /cvs Module name: src Changes by: dera...@cvs.openbsd.org 2009/02/24 06:20:03 Modified files: sys/arch/amd64/amd64: est.c sys/dev/acpi : acpicpu.c Log message: back out est.c 1.8 and bring acpicpu.c all the way back to 1.47 because of hanging machines. backed out correctly this time, as pointed out by tedu. This leads to cpu0: unknown Enhanced SpeedStep CPU, msr 0x0617091f0600091f cpu0: using only highest and lowest power states cpu0: Enhanced SpeedStep 2400 MHz (1196 mV): speeds: 2400, 1600 MHz on my Thinkpad X200. Thats not quite right as expected, scince this removes some month of changes in this area. But the system didn't crash so far. I prefer that. - Robert That's exactly what I have as well in my dmesg with a kernel built from today's sources, well, almost: cpu0: unknown Enhanced SpeedStep CPU, msr 0x0615081906000615 cpu0: using only highest and lowest power states cpu0: Enhanced SpeedStep 1200 MHz (1036 mV): speeds: 1600, 1200 MHz With apmd enabled, I experienced a freeze just hours ago, so I reverted to a kernel built on the 19th. I'll disable apmd and I'll give the new kernel another go. Thanks, Andreas Full dmesg of kernel built this morning (sorry for any gmail cut-n-paste weirdness): OpenBSD 4.5-beta (GENERIC.MP) #53: Wed Feb 25 09:21:07 GMT 2009 a...@qux:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 2119892992 (2021MB) avail mem = 2046464000 (1951MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (63 entries) bios0: vendor LENOVO version 7NETB7WW (2.17 ) date 07/29/2008 bios0: LENOVO 76693JG acpi0 at bios0: rev 2 acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT ASF! SSDT SSDT SSDT SSDT acpi0: wakeup devices LID_(S3) SLPB(S3) DURT(S3) IGBE(S4) EXP0(S4) EXP1(S4) EXP2(S4) EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) EHC0(S3) EHC1(S3) HDEF(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM)2 Duo CPU L7500 @ 1.60GHz, 1596.34 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16, xTPR,NXE,LONG cpu0: 4MB 64b/line 16-way L2 cache cpu0: apic clock running at 199MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM)2 Duo CPU L7500 @ 1.60GHz, 1596.00 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,CX16, xTPR,NXE,LONG cpu1: 4MB 64b/line 16-way L2 cache ioapic0 at mainbus0 apid 1 pa 0xfec0, version 20, 24 pins ioapic0: misconfigured as apic 2, remapped to apid 1 acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (AGP_) acpiprt2 at acpi0: bus 2 (EXP0) acpiprt3 at acpi0: bus 3 (EXP1) acpiprt4 at acpi0: bus -1 (EXP2) acpiprt5 at acpi0: bus -1 (EXP3) acpiprt6 at acpi0: bus -1 (EXP4) acpiprt7 at acpi0: bus 5 (PCI1) acpiec0 at acpi0 acpicpu0 at acpi0: C3, C2 acpicpu1 at acpi0: C3, C2 acpitz0 at acpi0: critical temperature 127 degC acpitz1 at acpi0: critical temperature 99 degC acpibtn0 at acpi0: LID_ acpibtn1 at acpi0: SLPB acpibat0 at acpi0: BAT0 model 42T5247 serial 1612 type LION oem SANYO acpibat1 at acpi0: BAT1 not present acpibat2 at acpi0: BAT2 not present acpiac0 at acpi0: AC unit online acpithinkpad0 at acpi0 acpidock at acpi0 not configured acpivideo at acpi0 not configured acpivideo at acpi0 not configured cpu0: unknown Enhanced SpeedStep CPU, msr 0x0615081906000615 cpu0: using only highest and lowest power states cpu0: Enhanced SpeedStep 1200 MHz (1036 mV): speeds: 1600, 1200 MHz pci0 at mainbus0 bus 0: configuration mode 1 pchb0 at pci0 dev 0 function 0 Intel GM965 Host rev 0x0c vga1 at pci0 dev 2 function 0 Intel GM965 Video rev 0x0c wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) intagp0 at vga1 agp0 at intagp0: aperture at 0xe000, size 0x1000 inteldrm0 at vga1: apic 1 int 16 (irq 10) drm0 at inteldrm0 Intel GM965 Video rev 0x0c at pci0 dev 2 function 1 not configured em0 at pci0 dev 25 function 0 Intel ICH8 IGP M AMT rev 0x03: apic 1 int 20 (irq 11), address 00:1d:72:98:d1:2b uhci0 at pci0 dev 26 function 0 Intel 82801H USB rev 0x03: apic 1 int 20 (irq 11) uhci1 at pci0 dev 26 function 1 Intel 82801H USB rev 0x03: apic 1 int 21 (irq 11) ehci0 at pci0 dev 26
Re: Firefox and Abiword don't see my printer
2009/1/29 Eugene Ryazanov kat...@gmail.com: As I can see on my openSUSE installation, AbiWord requires libgnomeprint and libgnomeprint requires libgnomecups. You can try x11/gnome/libgnomecups/ and x11/gnome/libgnomeprint ports. x11/gnome/libgnomecups is marked broken... -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Firefox and Abiword don't see my printer
2009/1/28 Antoine Jacoutot ajacou...@bsdfrog.org: On Wed, 28 Jan 2009, Shagbag OpenBSD wrote: I'm hoping someone can help me with this problem. I have an HP LaserJet 1018 printer attached to my linux server on which I am running the p910nd daemon. My OpenBSD (4.4-RELEASE) laptop has cups installed and cups can see the printer (ie. when I look for printers in Firefox at http://localhost:631I can see the printer listed as operating). I have compiled the foo2zjs printer driver (needed for the HPLJ1018) on my OpenBSD laptop without any problems. However, Firefox (File Print) only shows 'Print to File' in my list of printers and AbiWord (File Print) only shows 'Create a PDF document' and 'Generic Postscript'. Neither gives any option for my HPLJ1018. I have the ePDFview package installed on my OpenBSD laptop and, surprisingly, it recognises the printer and I have no problems printing from it. Has anyone experienced this problem and knows the answer? Why does ePDFview work while Firefox and AbiWord don't? How do I get them to work? Try installing the gtk-*-cups package to see if it makes a difference. Although I didn't have a problem with this (quite happy to print-to-file), installing x11/gtk+2,-cups made a difference in that I now see the CUPS printers in the Firefox print dialog. I'm happy I tried your suggestion. Regards, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: looks like bug in awk
2009/1/15 igor denisov denisovigor1...@rambler.ru: Hello there. There is a problem here. input: 34523 9485 394 3456 awk '{subtruct-=$1} END {print subtruct}' input output: -47858 same thing but without minus with awk '{sum+=$1} END {print sum}' input output: 47858 Why in both cases the code sums the field? Are you expecting '0' since the input file contains a space in front of the number? In that case, run awk with -F '[ ]', e.g. awk -F '[ ]' '{sum+=$1} END {print sum}' input Cheers, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: awk
2009/1/15 igor denisov denisovigor1...@rambler.ru: Hi there Can not understand. input: 34523 9348 98493 82983 9485 83928 9283 9283 394 39934 293 8347 3456 9238 9283 9283 awk 'NR==1 { for (i = 1; i = NF; i++) {n=$i; next}}; {n-=$i} END {print n}' input output: 21188 it is first column, why? You should really take these questions to an awk forum, not to this mailing list. Your program reads the first record, and assigns its first column to 'n' in a loop that is immediately exited (with 'next') and goes on to read the remaining records. For the remaining records, 'i' being still 1 from the prematurely exited loop, the first column is subtracted from 'n'. Regards, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: mutt 1.5.18 and set trash directive in .muttrc
Maybe it is because the Trash folder patch is not included by default on OpenBSD? You may compile your own version of Mutt with this patch applied if you wish. The patch is available from here: http://cedricduval.free.fr/mutt/patches/#trash 2009/1/8 David Schulz mailingli...@pg-sec.com: Hello all, i am using mutt 1.5.18 to handle my mail. I set it up via my muttrc file so that when i delete a mail, it goes to a Trash Folder. This is defined in .muttrc like this set trash=$HOME/.mail/mlists.pg-sec.com/Trash/ Now id like to move my mail and setup to a OpenBSD 4.4 Machine, i installed Mutt 1.5.18 and everything works fine, except that mutt under OpenBSD doesn't seem to recognize the set trash directive in my .muttrc; instead upon starting mutt, mutt complains that: Error in /home/mlists/.mutt/muttrc, line 8: trash: unknown variable source: errors in /home/mlists/.mutt/muttrc This is strange, because set trash should be working without any patches or the like as far as i know. Can anyone help me to troubleshoot this? Thanks a lot, David -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: How to start Syslogd with -u and -n options
1. Create /etc/rc.conf.local 2. In it, say syslogd_flags='your flags here' That goes for any flags from /etc/rc.conf that you'd like to change. Read the rc.conf(8) manual. Regards, Andreas 2008/12/11 Sma11T0wnITGuy [EMAIL PROTECTED]: I'm an OpenBSD noob. I'm setting up an OpenBSD Syslog Server. It will be the only device plugged into a particular switchport off its own VLAN on a switchcard in a Router. I'm running OpenBSD 4.3 with all applicable patches. The Syslog Server will not resolve any names, just accept log entries from the router, so I'd like to specify the -n option and the -u option. I've read the man pages for syslogd and syslog.conf, but I can't figure out how to get the daemon to start with the desired options. I must be missing or misunderstanding something in the man pages, or looking in the wrong places. Can someone help me define the startup options for syslogd, and tell me where to do so? Here's my syslog.conf file: # cat /etc/syslog.conf # $OpenBSD: syslog.conf,v 1.17 2005/05/25 07:35:38 david Exp $ # *.notice;auth,authpriv,cron,ftp,kern,lpr,mail,user.none /var/log/messages kern.debug;syslog,user.info /var/log/messages auth.info /var/log/authlog authpriv.debug /var/log/secure cron.info /var/cron/log daemon.info /var/log/daemon ftp.info/var/log/xferlog lpr.debug /var/log/lpd-errs mail.info /var/log/maillog #uucp.info /var/log/uucp # Uncomment this line to send important messages to the system # console: be aware that this could create lots of output. #*.err;auth.notice;authpriv.none;kern.debug;mail.crit /dev/console # Uncomment this to have all messages of notice level and higher # as well as all authentication messages sent to root. *.notice;auth.debug root # Everyone gets emergency messages. *.emerg * # Uncomment to log to a central host named loghost. You need to run # syslogd with the -u option on the remote host if you are using this. # (This is also required to log info from things like routers and # ISDN-equipment). If you run -u, you are vulnerable to syslog bombing, # and should consider blocking external syslog packets. #*.notice;auth,authpriv,cron,ftp,kern,lpr,mail,user.none@loghost #auth,daemon,syslog,user.info;authpriv,kern.debug @loghost # Uncomment to log messages from sudo(8) and chat(8) to their own # respective log files. Matches are done based on the program name. # Program-specific logs: !sudo *.* /var/log/sudo !chat *.* /var/log/chat # This line added to accept log files from Router *.* /var/log/router # -- View this message in context: http://www.nabble.com/How-to-start-Syslogd-with--u-and--n-options-tp20956554p20956554.html Sent from the openbsd user - misc mailing list archive at Nabble.com. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Question about sudo -v
Hi list, According to the manual for sudo, the -v command line switch does the following: If given the -v (validate) option, sudo will update the user's timestamp, prompting for the user's password if necessary. This extends the sudo timeout for another 5 minutes (or whatever the timeout is set to in sudoers) but does not run a command. On my system (CURRENT/amd64), it is obviously not doing this: $ sudo -K $ sudo -v $ # no output Is this changed behaviour, or is it a bug? The only non-default settings in my sudoers file is Defaults passwd_timeout = 0, and I haven't used timestamp_timeout. Regards, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Question about sudo -v
2008/12/8 Todd C. Miller [EMAIL PROTECTED]: Sounds like you have a line like this in sudoers: # Same thing without a password %wheelALL=(ALL) NOPASSWD: SETENV: ALL which would explain why you don't get prompted for a password. But since you didn't include the output of sudo -l I can't tell for sure. - todd Here you go: $ sudo -l Matching Defaults entries for ak on this host: env_keep+=DESTDIR FETCH_CMD FLAVOR FTPMODE GROUP MAKE MULTI_PACKAGES, env_keep+=OKAY_FILES OWNER PKG_DBDIR PKG_DESTDIR PKG_CACHE PKG_PATH, env_keep+=PKG_TMPDIR PORTSDIR RELEASEDIR SUBPACKAGE WRKOBJDIR, env_keep+=SSH_AUTH_SOCK EDITOR VISUAL SHARED_ONLY, passwd_timeout=0, !insults User ak may run the following commands on this host: (ALL) SETENV: ALL (ALL) NOPASSWD: /usr/local/libexec/xfsm-shutdown-helper Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Question about sudo -v
2008/12/8 Alexander Hall [EMAIL PROTECTED]: Andreas Kahari wrote: Hi list, According to the manual for sudo, the -v command line switch does the following: If given the -v (validate) option, sudo will update the user's timestamp, prompting for the user's password if necessary. This extends the sudo timeout for another 5 minutes (or whatever the timeout is set to in sudoers) but does not run a command. On my system (CURRENT/amd64), it is obviously not doing this: $ sudo -K $ sudo -v $ # no output Is this changed behaviour, or is it a bug? The only non-default settings in my sudoers file is Defaults passwd_timeout = 0, and I haven't used timestamp_timeout. If so you should not be able to run sudo other than as root. Ok, so I have added my own user to the sudoers file, just like the root user (ak ALL=(ALL) SETENV: ALL) and I've turned the insults off (Defaults !insults) and allowed for running xfsm-shutdown-helper without a password (%users ALL=(ALL) NOPASSWD: /usr/local/libexec/xfsm-shutdown-helper) which means it's not the default sudoers file, but I don't touch NOPASSWD in any other way and I don't modify the timestamp_timeout. My guess is that you have the following uncommented: %wheelALL=(ALL) NOPASSWD: SETENV: ALL It's still commented out in my file (see my response to Todd). /Alexander Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Question about sudo -v
2008/12/8 Todd C. Miller [EMAIL PROTECTED]: In message [EMAIL PROTECTED] so spake Andreas Kahari (andreas.kahari): Here you go: $ sudo -l Matching Defaults entries for ak on this host: env_keep+=DESTDIR FETCH_CMD FLAVOR FTPMODE GROUP MAKE MULTI_PACKAGES, env_keep+=OKAY_FILES OWNER PKG_DBDIR PKG_DESTDIR PKG_CACHE PKG_PATH, env_keep+=PKG_TMPDIR PORTSDIR RELEASEDIR SUBPACKAGE WRKOBJDIR, env_keep+=SSH_AUTH_SOCK EDITOR VISUAL SHARED_ONLY, passwd_timeout=0, !insults User ak may run the following commands on this host: (ALL) SETENV: ALL (ALL) NOPASSWD: /usr/local/libexec/xfsm-shutdown-helper That looks like a bug. The verifypw setting is not being handled correctly. - todd Ah, I think I found it. It is this line in my sudoers file that does it: %users ALL=(ALL) NOPASSWD: /usr/local/libexec/xfsm-shutdown-helper What's wrong with it? I was intending to let any member of the 'users' group execute the xfsm-shutdown-helper program, but this line has the side effect of making sudo -v not work properly. Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Question about sudo -v
2008/12/8 Todd C. Miller [EMAIL PROTECTED]: In message [EMAIL PROTECTED] so spake Andreas Kahari (andreas.kahari): Ah, I think I found it. It is this line in my sudoers file that does it: %users ALL=(ALL) NOPASSWD: /usr/local/libexec/xfsm-shutdown-helper What's wrong with it? I was intending to let any member of the 'users' group execute the xfsm-shutdown-helper program, but this line has the side effect of making sudo -v not work properly. The following patch should fix the behavior. I need to do some checking to make sure there are no other side effects but I believe it is correct. - todd Yes, the patch seems to be fixing it. I can't say anything about other side effects though. Thanks, Andreas Index: parse.c === RCS file: /home/cvs/openbsd/src/usr.bin/sudo/parse.c,v retrieving revision 1.20 diff -u -p -u -r1.20 parse.c --- parse.c 14 Nov 2008 11:58:08 - 1.20 +++ parse.c 8 Dec 2008 14:54:56 - @@ -192,12 +192,9 @@ sudo_file_lookup(nss, validated, pwflag) if ((pwcheck == any nopass != TRUE) || (pwcheck == all nopass != FALSE)) nopass = cs-tags.nopasswd; - if (match == ALLOW) - goto matched_pseudo; } } } - matched_pseudo: if (match == ALLOW || user_uid == 0) { /* User has an entry for this host. */ SET(validated, VALIDATE_OK); -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Virtual Consoles in OpenBSD/macppc
'tmux' (misc/tmux) is a nice alternative to 'screen'. Well worth trying out. Andreas 2008/11/13 Peter Kay - Syllopsium [EMAIL PROTECTED]: From: Pedro de Oliveira [EMAIL PROTECTED] Hi, Anyone here using OpenBSD/macppc knows if its possible to enable more than one virtual console? I cant seem to find any info about that in the FAQ. http://www.openbsd.org/faq/faq7.html It's not supported. Use 'screen' from packages instead. PK -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: How to reply read -s from bash (linux) in ksh (OpenBSD)
Something like stty -echo read variable stty echo Regards, Andreas 2008/11/12 HDC [EMAIL PROTECTED]: I need migrate a script to a OpenBSD server, this work ok, but in the script the some input parameters must be completed without echo in the terminal. I not found this in ksh, Thanks in advance! -- # /dev/hdc - OpenBSDeros.org hdc [at] openbsderos [dot] org -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: ifconfig -M on OpenBSD current.
Read the ifconfig(8) manual. Andreas 2008/11/3 Joco Salvatti [EMAIL PROTECTED]: Hi misc, I have already installed OpenBSD current on my laptop, but the ifconfig command doesn't support -M option. Knowing this, how can I scan the wireless networks on current? Thanks in advance. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: clearing /tmp
Read hier(7) manual. 2008/10/30 Lars Noodin [EMAIL PROTECTED]: Thomas Heller wrote: there is one thing that puzzles me about /tmp: I notice there is also /var/tmp. What is the reason for having two directories for apparently similar purposes? Would there be any major problems from combining the two, either by linking or symlinking one to the other? Regards -Lars -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Doubled binary in /bin in snapshot?
You're missing something. Try man [ and man test. They are the same. No problem. Andreas 2008/10/14 Tomas Bodzar [EMAIL PROTECTED]: Hi all, have you same problem ? Look at $ls -lF /bin There is a [* and test* ,both binaries do the same and cmp(1) says,that they are same. Am I missing something or it's bug? snapshot i386 #1076 -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Patching a SSH 'Weakness'
I'd like to see what I'm typing, as I'm typing it, in my interactive SSH session. Andreas 2008/9/11 [EMAIL PROTECTED]: Just off the top of my head (I have to check the SSH protocol yet): Why not encipher all accumulated keystrokes up to the Enter key as a block send them instead of sending each keystroke as it is typed? This shrouds the typist's characteristics. In addition, if the cipher is a block cipher, padding is added to make the number of bits a multiple of the block size. Mandatory padding with a nonce may help to shroud the number of keystrokes. The drawback is that the padding part could mean that we are no longer compatible with the SSH protocol. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Why not update Groff?
No need for any new features? Regards, Andreas On 18/02/2008, Pieter Verberne [EMAIL PROTECTED] wrote: Hi folks, Why is Groff not updated? OpenBSD 4.2 has Groff 1.15 from 1999. Some compatability issues? Pieter (offlist) -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: OpenCVS?
OpenCVS is not compiled or installed by default, yet, but the CVS in src/gnu/usr.bin/cvs/ is. Regards, Andreas On 20 Jan 2008 10:15:15 -0800, Unix Fan [EMAIL PROTECTED] wrote: Stuart Henderson wrote: See for yourself: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/cvs/ I'm slighly confused by something if the cvs command in OpenBSD 4.2 is OpenCVS, why does cvs --help refer to places like cvshome.org for updates etc? -Nix Fan. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Reversing audio channels
On 20/01/2008, Antti Harri [EMAIL PROTECTED] wrote: On Sun, 20 Jan 2008, L. V. Lammert wrote: Ahh, .. swap the speakers or wires?? I still don't understand why such a simple thing isn't implemented in the software.. Next you'd want it to fetch your slippers and serve you coffee as well... :-) -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: timezone changes
The afterboot(8) manual says to use ln -fs, e.g. ln -fs /usr/share/zoneinfo/Canada/Atlantic /etc/localtime That way, the /etc/localtime will never not be there (it will not be there for a short time between 'rm' and 'ln -s' if you do it that way). This is easily set up in a script that you may run using sudo... Regards, Andreas On 17/01/2008, frantisek holop [EMAIL PROTECTED] wrote: hi there, what is the standard way of changing the timezone esp. if someone is in another one every week :) is it just a simple rm /etc/localtime ln -s ? -f -- the world: a comedy for thinkers; a tragedy for feelers. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: timezone changes
On 17/01/2008, Paul de Weerd [EMAIL PROTECTED] wrote: On Thu, Jan 17, 2008 at 12:14:59PM +, Andreas Kahari wrote: | The afterboot(8) manual says to use ln -fs, e.g. | | ln -fs /usr/share/zoneinfo/Canada/Atlantic /etc/localtime | | That way, the /etc/localtime will never not be there (it will not be | there for a short time between 'rm' and 'ln -s' if you do it that | way). Sorry, but there will be a short time where the link is not there, even with ln -sf, there is no way to atomically change a symlink that I know of. From the source (/usr/src/bin/ln/ln.c) : /* * If the file exists, and -f was specified, unlink it. * Attempt the link. */ if ((fflag unlink(source) 0 errno != ENOENT) || (*linkf)(target, source)) { warn(%s, source); return (1); } First unlink(source), then link. It's a short period, but it's not 0. Cheers, Paul 'WEiRD' de Weerd Ok, but at least the time will be fair bit shorter... -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Limiting CPU to a process or process group?
On 14/01/2008, scott [EMAIL PROTECTED] wrote: *** Analogy: You're on a highway with a posted speed of 100 km/h. You want to operate your car and your car only 25 km/h only on the 100 km/h highway. *** And for this happy privilege, you want to impose the attendant nuisance (highway analogy), read overhead (o/s analogy), on all the other cars to have to slow behind and pass around you. This is a bad analogy because you can't do anything with the other 75 km/h. A better analogy would be a network connection that does not allow e.g. torrent traffic to exceed a particular fraction of the bandwidth. Or, if you want to find something to do with cars, a motorway with a separate lane for slow going vehicles (the slow moving vehicles will still be slow even though the other lanes might be empty). But I've understood from the other responses that this was not, even academically, an interesting problem, so I'll be quiet for a bit again. Thanks for all views, Andreas Generally, a time slice is a time slice. Regardless whether you get 1 sec of every 10 sec or 100 ms of every 1 s, you're going to execute your instructions at a rate of 100% of the cpu within your time slice allocation. Now you can impose scheduler and threading overhead and discipline to make your time slices very, very fine grained so that overall at a system level it looks like 25% of a resource, but your rate of execution within your context is going to be 100%. That said and for the cited examples, the workable answer that I know of is virtual machines. Be it VMWare, XEN, solaris containers (zones), freeBSD jails, qemu(*) or to a degree dragonflybsd (vkernel(*) -- system-in-a-box running as a userland process), each has a means to say that VM(1) gets 25% of the CPU resources and the vm-engine by whatever implement will effectively do so. And you will see that seti, for example, takes 100% of its VM(1) resource but only 25% of machine as a whole, less the overhead. (*)Not used personally. And, yes, we're aware of the opines herein and about re VM. /S -Original Message- From: Andreas Kahari [EMAIL PROTECTED] To: Alexander Schrijver [EMAIL PROTECTED] Cc: misc@openbsd.org Subject: Re: Limiting CPU to a process or process group? Date: Mon, 14 Jan 2008 14:27:33 + -- Andreas Kahari Somewhere in the general Cambridge area, UK
Limiting CPU to a process or process group?
Hi, Is there a way of limiting the amount of CPU given to a particular process or process group? For example, I would want the build of the qt4 port to use a maximum of 25% of the available CPU, leaving the CPU 75% idle if nothing else is happening on the machine. I know about 'nice', but it doesn't fulfil the criteria that the machine is left otherwise idle if nothing else runs on it. I don't have a real reason for why I would want to do this, I'm mainly curious as to if it's possible. Regards, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Limiting CPU to a process or process group?
On 14/01/2008, Alexander Schrijver [EMAIL PROTECTED] wrote: On Jan 14, 2008 11:52 AM, Andreas Kahari [EMAIL PROTECTED] wrote: Hi, Is there a way of limiting the amount of CPU given to a particular process or process group? For example, I would want the build of the qt4 port to use a maximum of 25% of the available CPU, leaving the CPU 75% idle if nothing else is happening on the machine. I know about 'nice', but it doesn't fulfil the criteria that the machine is left otherwise idle if nothing else runs on it. I don't have a real reason for why I would want to do this, I'm mainly curious as to if it's possible. [cut] I have never done this myself, but I believe this is possible by creating a login class in /etc/login.conf and set the cputime option. See login.conf(5) for a better description. Hi Alexander, I believe that the cputime resource limit will limit the maximum amount of CPU time that the user may use in a session, which is not really what I asked for. I'd like the process or process group to run for as long as it needs to run, but that it only ever uses a fraction of the CPU power. It's like limiting the network bandwidth for a particular type of traffic, only this is about time on the CPU. Regards, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Limiting CPU to a process or process group?
On 14/01/2008, Alexander Schrijver [EMAIL PROTECTED] wrote: On Jan 14, 2008 1:30 PM, Andreas Kahari [EMAIL PROTECTED] wrote: On 14/01/2008, Alexander Schrijver [EMAIL PROTECTED] wrote: On Jan 14, 2008 11:52 AM, Andreas Kahari [EMAIL PROTECTED] wrote: Hi, Is there a way of limiting the amount of CPU given to a particular process or process group? For example, I would want the build of the qt4 port to use a maximum of 25% of the available CPU, leaving the CPU 75% idle if nothing else is happening on the machine. I know about 'nice', but it doesn't fulfil the criteria that the machine is left otherwise idle if nothing else runs on it. I don't have a real reason for why I would want to do this, I'm mainly curious as to if it's possible. [cut] I have never done this myself, but I believe this is possible by creating a login class in /etc/login.conf and set the cputime option. See login.conf(5) for a better description. Hi Alexander, I believe that the cputime resource limit will limit the maximum amount of CPU time that the user may use in a session, which is not really what I asked for. I'd like the process or process group to run for as long as it needs to run, but that it only ever uses a fraction of the CPU power. It's like limiting the network bandwidth for a particular type of traffic, only this is about time on the CPU. Regards, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK Yes, you are right. It is also possible to set a priority for a process in a login class. From login.conf(5) priority number Initial priority (nice) level. This is not exactly what you want, but it is pretty close. I am curious why do you want to set an exact limit and not let the scheduler do this for you? As I said, I don't have a good reason for wanting to do this. It just seemed like something someone might want to do. But let me dream up three examples: Sometimes firefox (or whatever program) goes a bit haywire and brings the machine to a crawl. It would be nice to limit firefox's CPU to a maximum of, say, 50% so that I'm guaranteed to have 50% of the machine to work with. Another example: Let's say I'm rebuilding the kernel, base system, and all my packages after a major update from CVS after a long time away. I'm not worried about how long this takes so I'm quite happy to run the build at 5% of the CPU while I get on with my work. Third example, similar to the last one: I'm running a distributed.net or SETI-at-home client in the background, but I don't ever want it to run at 100% of the CPU, maybe because that would make the machine too noisy during the night (due to the fans). Maybe no-one has these kind of requirements? Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Limiting CPU to a process or process group?
On 14/01/2008, Alexander Schrijver [EMAIL PROTECTED] wrote: On Jan 14, 2008 2:34 PM, Andreas Kahari [EMAIL PROTECTED] wrote: On 14/01/2008, Alexander Schrijver [EMAIL PROTECTED] wrote: On Jan 14, 2008 1:30 PM, Andreas Kahari [EMAIL PROTECTED] wrote: On 14/01/2008, Alexander Schrijver [EMAIL PROTECTED] wrote: On Jan 14, 2008 11:52 AM, Andreas Kahari [EMAIL PROTECTED] wrote: Hi, Is there a way of limiting the amount of CPU given to a particular process or process group? For example, I would want the build of the qt4 port to use a maximum of 25% of the available CPU, leaving the CPU 75% idle if nothing else is happening on the machine. I know about 'nice', but it doesn't fulfil the criteria that the machine is left otherwise idle if nothing else runs on it. I don't have a real reason for why I would want to do this, I'm mainly curious as to if it's possible. [cut] I have never done this myself, but I believe this is possible by creating a login class in /etc/login.conf and set the cputime option. See login.conf(5) for a better description. Hi Alexander, I believe that the cputime resource limit will limit the maximum amount of CPU time that the user may use in a session, which is not really what I asked for. I'd like the process or process group to run for as long as it needs to run, but that it only ever uses a fraction of the CPU power. It's like limiting the network bandwidth for a particular type of traffic, only this is about time on the CPU. [cut sigs] Yes, you are right. It is also possible to set a priority for a process in a login class. From login.conf(5) priority number Initial priority (nice) level. This is not exactly what you want, but it is pretty close. I am curious why do you want to set an exact limit and not let the scheduler do this for you? As I said, I don't have a good reason for wanting to do this. It just seemed like something someone might want to do. But let me dream up three examples: Sometimes firefox (or whatever program) goes a bit haywire and brings the machine to a crawl. It would be nice to limit firefox's CPU to a maximum of, say, 50% so that I'm guaranteed to have 50% of the machine to work with. Another example: Let's say I'm rebuilding the kernel, base system, and all my packages after a major update from CVS after a long time away. I'm not worried about how long this takes so I'm quite happy to run the build at 5% of the CPU while I get on with my work. What you describe here is exactly what you can accomplish with either nice or the priority option in login.conf. Also, I am not exactly sure what you mean with percent of CPU. Do you mean the difference of cpu time scheduled between a 'normal' process? It is not quite the same because a process, even running at niceness level 20, will grab as much CPU as it can (unless it has to wait for data). What I mean is what I wrote in my first email: For example, I would want the build of the qt4 port to use a maximum of 25% of the available CPU, leaving the CPU 75% idle if nothing else is happening on the machine. Third example, similar to the last one: I'm running a distributed.net or SETI-at-home client in the background, but I don't ever want it to run at 100% of the CPU, maybe because that would make the machine too noisy during the night (due to the fans). I think this is a different issue. I don't know how this can be solved. An idea might be to underclock your cpu at night. Yes, I could sysctl -w hw.setperf=0 or something like that on my SpeedStep'able CPU, but with hw.setperf=0, a process still have the possibility to get 100% of the CPU. It will be a slower CPU, but it's still not limiting the process to use only a fraction of the CPU at any instance in time. Again, maybe no-one has these kind of requirements in real life? Regards, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: GENERIC kernel compile fails at pcidevs_data.h
This was fixed a bit later. Just update from CVS again... Regards, Andreas On 11/12/2007, Rob Lytle [EMAIL PROTECTED] wrote: I cvsup'd this morning. Now I can't compile any kernels. They all hang at or near pcidevs_data.h Rob -- Emancipate yourself from mental slavery, none but ourselves can free our minds Bob Marley, Redemption Song -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: cp(1) bug ?
On 20/10/2007, Aaron W. Hsu [EMAIL PROTECTED] wrote: From: Tom Van Looy [EMAIL PROTECTED] Date: Fri, 19 Oct 2007 20:21:56 + Subject: Re: cp(1) bug ? it shall do nothing more with source_file and shall go on to any remaining files. Doesn't this mean that cp should not do anything when, for example, the following command is run? $ cp -R foo foo/ What constitutes any remaining file when the -R switch is used? I think that the next step is step 2f (according to the spec): The files in the directory source_file shall be copied to the directory dest_file, taking the four steps (1 to 4) listed here with the files as source_files. Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: cp(1) bug ?
On Debian, you also end up with a directory structure consisting of one new 'foo' directory within the original 'foo' directory, which is contradicting the message about not being able to copy foo into itself... $ mkdir foo $ touch foo/bar $ cp -R foo foo cp: cannot copy a directory, `foo', into itself, `foo/foo' $ ls -lR foo foo: total 4 -rw-r--r-- 1 ak ak0 2007-10-19 11:14 bar drwxr-xr-x 2 ak ak 4096 2007-10-19 11:14 foo foo/foo: total 0 -rw-r--r-- 1 ak ak 0 2007-10-19 11:14 bar According to SUSv3, the cp utility *may* issue a diagnostic message when the source and target arguments are the same. IMHO we're doing the right thing with regards to that part. I'm not sure about recursively creating a very deep directory structure, but it's not a problem really. Andreas On 19/10/2007, Pau Amaro-Seoane [EMAIL PROTECTED] wrote: penguin's behaviour: elachistos| cp -R foo foo cp: cannot copy a directory, `foo', into itself, `foo/foo' :) 2007/10/19, Arnaud Berthomier [EMAIL PROTECTED]: On the October 17, at 10:39 (-0700), Bryan Irvine wrote: [...] looks like a feature to me. ;) Agreed, although it does not seem to exists on GNU/Linux since GNU's cp is different from BSD's. The feature is present on {Net,Open,Free}BSD. It's not that a big deal, is it? Eventually, the question could be: what should be limiting cp there? a max_path value, or... himself? I think the former's the best. Just my 2 cents. :) -- B+ A nation is a society united by a delusion about it's ancestry and by common hatred of its neighbours. B;-- Dean William R. Inge -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: scp batch mode?
Another way: # Open a connection to the remote host and # create a control socket at /tmp/ssh_socket ssh -S /tmp/ssh_socket -M -N -f host.example.com # Use the control socket to transfer files. scp -o ControlPath=/tmp/ssh_socket file1 dummy:remote_file1 scp -o ControlPath=/tmp/ssh_socket file2 dummy:remote_file2 # etc. # or with rsync... rsync --rsh=ssh -S /tmp/ssh_socket -av /local/dir/ dummy:/remote/dir/ # Bring the connection down. ssh -S /tmp/ssh_socket -O exit dummy The dummy host above can be anything, it doesn't matter since you have already specified the socket to send things through. Cheers, Andreas On 15/08/07, James Hartley [EMAIL PROTECTED] wrote: The manpage for scp(1) mentions the -B option for running scp in batch mode, but no further details. How can scp be run without prompting for a password? Thanks. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Rename multiple files at once
On 27/06/07, Olivier Mehani [EMAIL PROTECTED] wrote: On Wed, Jun 27, 2007 at 02:37:07PM +0200, Pieter Verberne wrote: How do I rename multiple files at once? I want to rename a list of files like: file.jpg file1.jpg file_2.jpg to: file_thumb.jpg file1_thumb.jpg file_2_thumb.jpg Using bash, you can do something like that: for file in file.jpg file1.jpg file_2.jpg; do mv $file ${file/.jpg/_thumb.jpg} done Assuming your files are matched by file*.jpg, you can do this in ksh (the default shell in OpenBSD): for f in file*.jpg; do mv $f ${f%.jpg}_thumb.jpg done Cheers, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: How to install packages from FreeBSD
On 23/06/07, Nick Guenther [EMAIL PROTECTED] wrote: On 6/22/07, Alex Kwan [EMAIL PROTECTED] wrote: Hi! I found some packages (mainly for Chinese) under FreeBSD are useful to me, how to install and runt it? thanks! The two (Free and Open BSD) don't share a package system, but they do have a similar ports system. If you get the ports files from freebsd (if the FreeBSD ports collection is installed, look under /usr/ports) and find the files for the program you want, and copy them over to your OpenBSD system (putting them in the right place in the OpenBSD ports tree) and run the standard make make install you might just get lucky. But you'll probably run into problems. They will probably need more porting than just that. :( -Nick If the program is essential, then it would be easier to just install FreeBSD, or to compile it outside of the ports/package system. Less possible problems that way... Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Single argument for mv cp
On 17/06/07, Clint Pachl [EMAIL PROTECTED] wrote: The other day on the Internet I found a shell tip that showed how to use cp or mv with only a single argument. I tried it in the default pdksh in OBSD and it worked. I thought to myself, I can't believe I have been using the shell for over 8 years and didn't know that. Now I can't remember how to do it or where I found the tip. Does anybody know what I'm talking about? (I'm too lazy to look through source for this) This obviously isn't correct, but it went something like this: $ ls test $ cp {test,.bak} $ ls testtest.bak This is not actually invoking cp with only one argument. See here: $ set -x $ touch test + touch test $ cp test{,.bak} + cp test test.bak With set -x, the shell will tell us exactly what gets executed. Cheers, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Regular Expression Problem
On 14/06/07, Julian Leyh [EMAIL PROTECTED] wrote: I got in the output (Which I not want): [EMAIL PROTECTED] - I believed with [a-zA-Z]{2,4} I can limit it after the . Or? [EMAIL PROTECTED] - It should be as well not possible with [a-zA-Z]{2,4} How can I exclude this? You did not say that after the 2-4 characters the line should end... End the pattern with $ As weel I got as output this which I do not want: [EMAIL PROTECTED] $ is normall end of a line. But it should not be in a mail address. [a-zA-Z0-9.-_]+@ I use the + here with the meaning the [a-zA-Z0-9.-_] has to be available min. one of them. Nothing for a @ makes really no sense. You did not say it should be at the beginning.. everything can be in front of the matching token. Start the pattern with ^ Also you are not escaping the . - meaning it can match to anything. try it with this: egrep [EMAIL PROTECTED],4}$ good source to read more about it is re_format(7) Regards, Julian No need to escape the dot in []... -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Beep!
Print a bell character, e.g. print \\a in ksh. Use xset b on if the bell has been turned off via xset b off. Regards, Andreas On 10/04/07, Manuel Ravasio [EMAIL PROTECTED] wrote: Hello list. I have a small, trivial task I can't accomplish and I'm sure you guys can help me in a second. I'm creating some shell scripts for various administrative purposes, and I'd really like to add some kind of command at the end of each in order to have the pc speaker BEEP when the script is over. Is there a way to do so on OpenBSD 4.0/i386? I've shuffled through MISC archives and FAQs, but I found nothing relevant... Thank you all, byee, Manuel Don't get soaked. Take a quick peak at the forecast with the Yahoo! Search weather shortcut. http://tools.search.yahoo.com/shortcuts/#loc_weather -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Disk Load
Use systat and read the systat(1) manual. Regards, Andreas On 22/03/07, Tang Tse [EMAIL PROTECTED] wrote: Hello, Maybe it is an stupid question, but since 1 week ago i got my HDD led allways powered on. Is it possible with something like top to see hdd % load o something like? Thanks. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: auto-login as a console ordinary user
I used to do things like this. First exercise: How to log in with your own username and password. Second exercise: How to change your password. Andreas On 08/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: In an educational context (teaching children something different than MS WinXP) After booting I would like to login automatically as a normal user (in other words, to find the prompt of the ordinary user magically). How can I achieve this result? Vittorio -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: some basic questions
On 31/01/07, Joachim Schipper [EMAIL PROTECTED] wrote: On Wed, Jan 31, 2007 at 05:10:58AM +0800, ronald jiang wrote: [cut] c. adduser within group wheel, but cannot 'sudo', what's the problem? See /etc/sudoers. No, read the manuals for 'visudo' and 'sudoers'. The visudo command gives you a copy of /etc/sudoers to edit and then performs sanity checks on it before installing it as /etc/sudoers when your done. Don't touch /etc/sudoers directly. Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: OpenBSD 3.9 (i386) and mount_udf - big problem
On 29/01/07, Pedro Martelletto [EMAIL PROTECTED] wrote: Andreas, On Mon, Jan 29, 2007 at 09:45:14AM +, Andreas Kahari wrote: I had the same problem (FSD does not lie within the partition! when trying to mount a UDF DVD disc). I applied the patch below from Pedro to a current i386 system, but that resulted in a locked system (everything waiting in 'inode') when trying to mount the disc again. Sorry about that, the diff had a little mistake. Could you please try this one? [cut] The patch will make the machine not lock up, but it still doesn't mount the DVD disc. This time, I get no messages from the kernel in /var/log/messages, but I get the error message mount_udf: mount: Invalid argument in the console. This is the disklabel from the DVD disc: $ sudo disklabel cd0 # /dev/rcd0c: type: ATAPI disk: Talks label: fictitious flags: bytes/sector: 2048 sectors/track: 100 tracks/cylinder: 1 sectors/cylinder: 100 cylinders: 20449 total sectors: 2044832 rpm: 300 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # microseconds track-to-track seek: 0 # microseconds drivedata: 0 3 partitions: # sizeoffset fstype [fsize bsize cpg] a: 2044832 0 UDF # Cyl 0 - 20448* c: 2044832 0 UDF # Cyl 0 - 20448* I've tried mounting cd0a and cd0c but it doesn't seem to make a difference. Regards, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: OpenBSD 3.9 (i386) and mount_udf - big problem
udf_mountfs(): 0, 1 On 30/01/07, Pedro Martelletto [EMAIL PROTECTED] wrote: Andreas, On Tue, Jan 30, 2007 at 09:55:28AM +, Andreas Kahari wrote: The patch will make the machine not lock up, but it still doesn't mount the DVD disc. This time, I get no messages from the kernel in /var/log/messages, but I get the error message mount_udf: mount: Invalid argument in the console. Can you please try this diff, so that we know the exact point of failure? (It should apply over your already patched udf_vfsops.c.) Thanks, -p. --- udf_vfsops.c.orig Tue Jan 30 11:50:58 2007 +++ udf_vfsops.cTue Jan 30 11:51:52 2007 @@ -327,6 +327,7 @@ udf_mountfs(struct vnode *devvp, struct } if (!part_found || !logvol_found) { + printf(udf_mountfs(): %d, %d\n, part_found, logvol_found); error = EINVAL; goto bail; } -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: OpenBSD 3.9 (i386) and mount_udf - big problem
Replying to a somewhat old message... I had the same problem (FSD does not lie within the partition! when trying to mount a UDF DVD disc). I applied the patch below from Pedro to a current i386 system, but that resulted in a locked system (everything waiting in 'inode') when trying to mount the disc again. Regards, Andreas On 18/06/06, Pedro Martelletto [EMAIL PROTECTED] wrote: Can you please try this diff? -p. Index: udf_vfsops.c === RCS file: /cvs/src/sys/isofs/udf/udf_vfsops.c,v retrieving revision 1.7 diff -u -p -r1.7 udf_vfsops.c --- udf_vfsops.c14 Jun 2006 16:40:15 - 1.7 +++ udf_vfsops.c18 Jun 2006 13:54:15 - @@ -331,10 +331,17 @@ udf_mountfs(struct vnode *devvp, struct } pd = (struct part_desc *)bp-b_data; if (!udf_checktag(pd-tag, TAGID_PARTITION)) { - part_found = 1; part_num = letoh16(pd-part_num); + /* +* Until we fully support multiple partitions, do the +* best we can by trying to find a partition that +* matches the file set descriptor we got above. +*/ + if (fsd_part fsd_part != part_num) + continue; udfmp-part_len = letoh32(pd-part_len); udfmp-part_start = letoh32(pd-start_loc); + part_found = 1; } brelse(bp); -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: % stdout?
Have a look in your C code book. The you will need to printf %% to get a '%'. Andreas On 09/11/06, Cassio B. Caporal [EMAIL PROTECTED] wrote: Hey, I have problems to print '%' in stdout... Suppose code below: #include stdio.h main() { char foo[] = bar=30%\n; fprintf(stdout, bar); } OpenBSD returns : bar=30 Linux returns : bar=30% How can I solve this? Thanks, -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: % stdout?
Suppose the data in 'foo' comes from user input: #include stdio.h main() { charfoo[] = bar=30%\n; fprintf(stdout, %s, foo); } Andreas On 09/11/06, Jason Dixon [EMAIL PROTECTED] wrote: On Nov 9, 2006, at 11:37 AM, Cassio B. Caporal wrote: Hey, I have problems to print '%' in stdout... Suppose code below: #include stdio.h main() { char foo[] = bar=30%\n; fprintf(stdout, bar); } OpenBSD returns : bar=30 Linux returns : bar=30% How can I solve this? Thanks, $ cat foo.c #include stdio.h main() { char foo[] = bar=30%%\n; fprintf(stdout, foo); } $ gcc foo.c -o foo $ ./foo bar=30% -- Jason Dixon DixonGroup Consulting http://www.dixongroup.net -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: tar question
On 31/10/06, Joachim Schipper [EMAIL PROTECTED] wrote: On Tue, Oct 31, 2006 at 11:06:13AM +0100, ropers wrote: On 31/10/06, Mike Spenard [EMAIL PROTECTED] wrote: After tar has finished writing to the tape device is there a way to see how large the finished tar on tape is? Forgive me if this sounds impressively stupid, but would you not just use ls(1) for that? No, tapes are not block devices; only block devices hold filesystems. (When you think about it, this makes sense; seek times would be prohibitively high for tapes.) Also, is there a way to monitor the transfer rate to the tape device? I doubt that there's a trivial way to do that, and I'm not knowledgeable enough to really be able to help with any non-trivial way to do this. How about tar czpf / | dd obs=$BIGNUM /dev/nrst0? More sophisticated methods are always possible, of course... I was thinking about something similar but using buffer from the misc/buffer port somehow instead of dd. I believe that that program will give you both the total size (in bytes transferred, I'm not certain this is the same as the size of the achive on the tape as I don't know anything about tape drives) and the rate of the transfer. Read the manual. Cheers, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Lenovo notebooks
On 26/10/06, martin g [EMAIL PROTECTED] wrote: Hello all Has anyone got experience with Lenovo notebooks running OpenBSD. If you are so kind to share your experience. http://marc.theaimsgroup.com/?l=openbsd-miscs=lenovo -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: pfctl
On 13/10/06, fv [EMAIL PROTECTED] wrote: I want to add some code to pfctl which would add all important rules to pf. In such way, if that rules wouldn't be in pf.conf they would BE in pf. I think it's a very bad idea. The best you can do i think is to write a pfctl wrapper script in order to load your mandatory rules and rename it to pfctl. Anyway, you would better play with sudo and create and account for you and another for the other admin. If you persist in that idea take a look at pf(4). I don't think technical solutions to management problems are the way to go at all. Just talk to the guy. If that fails, talk to the manager. If that fails, have a really good think about your future. Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: iwi firmware
Use the link in the iwi(4) manual. Cheers, Andreas On 02/09/06, Tautvydas [EMAIL PROTECTED] wrote: Hello List, I've strange problem. My laptop has Intel(r) PRO/Wireless 2200BG network adapter, so I need firmware to work with iwi driver. I've upgraded my obsd system to snapshtop (Intel(r) PRO/Wireless 2200BG) and downloaded latest firmware: http://damien.bergamini.free.fr/ipw/download.html But system says, that I've need at least 3.0 firmware version. dmesg: iwi0: firmware image too old (need at least 3.0) Anyone had the same problem? -- Hi, I'm a .signature virus! Copy me to your .signature file and help me propagate, thanks! -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: cat -v
On 28/07/06, Marcus Watts [EMAIL PROTECTED] wrote: Nick Guenther [EMAIL PROTECTED] writes: ... Anyway, I wasn't trying to fight about it, I'm just curious. ... sed -n l has been around since forever or at least since v7. Presumably before that folks used ed or od. cat -v -e etc. have been around in *bsd since at least 4.1bsd. I don't remember ATT picking up on those options, but probably -v, -e, etc., are part of various standards today. Certainly the FSF folks picked up on those flags in their GNU core utilities. The only standard (SUSv3) switch for the cat utility is -u for unbuffered output. The -e, -t, -v, -s, and -n switches are mentioned in the rationale, and the reason for not having them in the standard is that the same functionality may be found in other utilities (giving examples using sed(1) and pr(1)). http://www.unix.org/online.html Regards, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Problem with x11/xfce4/xfce4-netload on i386, not on amd64
On 19/07/06, Antoine Jacoutot [EMAIL PROTECTED] wrote: On Wed, 19 Jul 2006, Andreas Kahari wrote: Not terribly important, but I have a problem with the netload panel plugin for Xfce4. It shows the in/out rates for my interfaces (vr re) on my amd64 machine, but on my i386 Vaio laptop with an fxp interface it always shows no traffic. It is able to figure out the IP number for the interface, but the speeds are always zero. For what it's worth, it works fine here on current/macppc. Can you reproduce this on another i386 box ? I do have another i386 at home, an ancient 133MHz machine. It doesn't have an fxp card in it though and I would need to back it up and install OpenBSD on it. I thought it would be easier to find someone on the list with i386+fxp+xfce4... Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Problem with x11/xfce4/xfce4-netload on i386, not on amd64
On 20/07/06, Adam [EMAIL PROTECTED] wrote: Andreas Kahari [EMAIL PROTECTED] wrote: I do have another i386 at home, an ancient 133MHz machine. It doesn't have an fxp card in it though and I would need to back it up and install OpenBSD on it. I thought it would be easier to find someone on the list with i386+fxp+xfce4... I'm running xfce4 on my laptop with an onboard fxp. The netload plugin has always worked fine here, ever since xfce4 got added to ports. Ok, thanks. I'm assuming that's a i386 laptop (you didn't say). This means that there is some peculiarity with my laptop. What would be needed to track this down? I have attached a dmesg here (sorry for possibly bad linewraps, courtesy of Gmail): OpenBSD 3.9-current (GENERIC) #11: Sat Jul 8 15:14:04 BST 2006 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC cpu0: Intel(R) Pentium(R) M processor 1700MHz (GenuineIntel 686-class) 1.69 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,TM,SBF,EST,TM2 cpu0: Enhanced SpeedStep 1700 MHz (1484 mV): speeds: 1700, 1400, 1200, 1000, 800, 600 MHz real mem = 535851008 (523292K) avail mem = 482983936 (471664K) using 4256 buffers containing 26894336 bytes (26264K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+(97) BIOS, date 11/21/03, BIOS32 rev. 0 @ 0xfd751, SMBIOS rev. 2.3 @ 0xd8010 (17 entries) bios0: Sony Corporation PCG-Z1XSP(GB) apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown apm0: flags 30102 dobusy 0 doidle 1 pcibios0 at bios0: rev 2.1 @ 0xfd750/0x8b0 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf30/176 (9 entries) pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82371FB ISA rev 0x00) pcibios0: PCI bus #3 is the last bus bios0: ROM list: 0xc/0x1 0xd8000/0x4000! 0xdc000/0x4000! cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 Intel 82855PE Hub rev 0x03 ppb0 at pci0 dev 1 function 0 Intel 82855PE AGP rev 0x03 pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 ATI Radeon Mobility M6 LY rev 0x00 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) uhci0 at pci0 dev 29 function 0 Intel 82801DB USB rev 0x03: irq 9 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered uhci1 at pci0 dev 29 function 1 Intel 82801DB USB rev 0x03: irq 9 usb1 at uhci1: USB revision 1.0 uhub1 at usb1 uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered uhci2 at pci0 dev 29 function 2 Intel 82801DB USB rev 0x03pci_intr_map: no mapping for pin C : couldn't map interrupt ehci0 at pci0 dev 29 function 7 Intel 82801DB USB rev 0x03pci_intr_map: no mapping for pin D : couldn't map interrupt ppb1 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0x83 pci2 at ppb1 bus 2 cbb0 at pci2 dev 5 function 0 Ricoh 5C475 CardBus rev 0xb8: irq 3 Ricoh 5C551 Firewire rev 0x00 at pci2 dev 5 function 1 not configured fxp0 at pci2 dev 8 function 0 Intel PRO/100 VE rev 0x83, i82562: irq 9, address 08:00:46:c8:ad:ab inphy0 at fxp0 phy 1: i82562ET 10/100 PHY, rev. 0 iwi0 at pci2 dev 11 function 0 Intel PRO/Wireless 2200BG rev 0x05: irq 9, address 00:0e:35:07:44:15 cardslot0 at cbb0 slot 0 flags 0 cardbus0 at cardslot0: bus 3 device 0 cacheline 0x0, lattimer 0x40 pcmcia0 at cardslot0 ichpcib0 at pci0 dev 31 function 0 Intel 82801DBM LPC rev 0x03 pciide0 at pci0 dev 31 function 1 Intel 82801DBM IDE rev 0x03: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility wd0 at pciide0 channel 0 drive 0: IC25N080ATMR04-0 wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5 atapiscsi0 at pciide0 channel 1 drive 0 scsibus0 at atapiscsi0: 2 targets cd0 at scsibus0 targ 0 lun 0: MATSHITA, UJ-812, K101 SCSI0 5/cdrom removable cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 ichiic0 at pci0 dev 31 function 3 Intel 82801DB SMBus rev 0x03pci_intr_map: no mapping for pin B : polling iic0 at ichiic0 auich0 at pci0 dev 31 function 5 Intel 82801DB AC97 rev 0x03: irq 9, ICH4 AC97 ac97: codec id 0x594d4803 (Yamaha YMF753-S) ac97: codec features 18 bit DAC, No 3D Stereo audio0 at auich0 Intel 82801DB Modem rev 0x03 at pci0 dev 31 function 6 not configured isa0 at ichpcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 pms0 at pckbc0 (aux slot) pckbc0: using irq 12 for aux slot wsmouse0 at pms0 mux 0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: PC speaker spkr0 at pcppi0 npx0 at isa0 port 0xf0/16: using exception 16 biomask effd netmask effd ttymask pctr: 686-class user-level performance counters enabled mtrr: Pentium Pro MTRR support dkcsum: wd0 matches BIOS drive 0x80 root on wd0a rootdev=0x0 rrootdev=0x300 rawdev=0x302 -- Andreas
Problem with x11/xfce4/xfce4-netload on i386, not on amd64
Hi list, Not terribly important, but I have a problem with the netload panel plugin for Xfce4. It shows the in/out rates for my interfaces (vr re) on my amd64 machine, but on my i386 Vaio laptop with an fxp interface it always shows no traffic. It is able to figure out the IP number for the interface, but the speeds are always zero. Does anyone have a fix, patch, or workaround for this? ... or maybe just an explanation as to why I should not be surprised? Everything is CURRENT, and this is the way it's been since I switched over to Xfce4 a year or so ago. Cheers, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: ntpdate program not working with openntpd
Is there a firewall blocking the requests in either direction? Does networki routing etc. work apart from this? Andreas On 15/07/06, Bo Granlund [EMAIL PROTECTED] wrote: Hi, I have a problem with ntpd. I have a number of openbsd machines here and one of them is connected to a gps receiver which now (after a dirty hack) sets the time very precisely. I would love to sync all my other machines against the gps powered ntpd. Now the problem is that ntpdate (in linux) or ntpd's in other openbsd boxes don't simply work. ntpdate says this: sunrise:~# ntpdate fury 15 Jul 08:54:34 ntpdate[18841]: no server suitable for synchronization found Another openbsd machine (volatile) is configured to use fury (the machine with the gps receiver) as the server to poll for the time. This is what ntpd has to say about that: ntp engine ready reply from 10.0.5.30: not synced, next query 3151s no reply received in time, skipping initial time setting The problems range over openbsd and linux so I don't know what's broken. I'd say that ntpd has some issues with it. My config on the gps machine is # Addresses to listen on (ntpd does not listen by default) listen on * # sync to a single server #server ntp.example.org # use a random selection of 8 public stratum 2 servers # see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers #servers pool.ntp.org sensor nmea0 and nmea0 is working ok, so no problem there. You just can't query the time from an openntpd instance. Am I doing something wrong? Would it help if I send dmesg's etc.? Is there some trick to just make ntpd work properly with external queriers? I've tried to figure this one out but am out of ideas now. best regards, Bo Granlund -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Recompiling Perl 5.8.6
What is wrong with having two separate Perl installations, the base one (untouched), and your own one (in e.g. /opt or /usr/opt or wherever you'd like)? Andreas On 15/07/06, Karel Kulhavy [EMAIL PROTECTED] wrote: Is it OK to download perl 5.8.6 (the same that is in OpenBSD 3.9) then compile it using supplied hints/openbsd.sh and install over the existing perl? I want GDBM_File and GDBM_File is in perl 5.8.6. - will the perl still work (at least pkg_add and pkg_delete)? - will GDBM_File start working? I tried installing GDBM_File by going into perl-5.8.6/ext/GDBM_File: [EMAIL PROTECTED]:/home/clock/perl-5.8.6/ext/GDBM_File$ perl Makefile.PL Note (probably harmless): No library found for -lgdbm Note (probably harmless): No library found for -ldbm Writing Makefile for GDBM_File [EMAIL PROTECTED]:/home/clock/perl-5.8.6/ext/GDBM_File$ make Can't locate ExtUtils/Command.pm in @INC (@INC contains: /usr/lib/perl5/5.8.6/OpenBSD.i386-openbsd /usr/lib/perl5/5.8.6 /usr/local/lib/perl5/site_perl/5.8.6/OpenBSD.i386-openbsd /usr/local/lib/perl5/site_perl/5.8.6 /usr/local/lib/perl5/site_perl .). BEGIN failed--compilation aborted. *** Error code 2 But when I do perl -V: [...] Built under openbsd @INC: /usr/libdata/perl5/i386-openbsd/5.8.6 /usr/local/libdata/perl5/i386-openbsd/5.8.6 /usr/libdata/perl5 /usr/local/libdata/perl5 /usr/local/libdata/perl5/site_perl/i386-openbsd /usr/libdata/perl5/site_perl/i386-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl /usr/local/lib/perl5/site_perl [EMAIL PROTECTED]:/home/clock/perl-5.8.6/ext/GDBM_File$ locate Command.pm /usr/libdata/perl5/ExtUtils/Command.pm So it doesn't work and I don't know why. I tried to figure out something about the mysterious @INC thing. Man perl says only this: FILES @INC locations of perl libraries but it's a blind alley: [EMAIL PROTECTED]:~$ man INC man: no entry for INC in the manual. [EMAIL PROTECTED]:~$ man '@INC' man: no entry for @INC in the manual. [EMAIL PROTECTED]:~$ locate 'INC' [EMAIL PROTECTED]:~$ locate '@INC' man perl says there's a file called @INC, but it's not true. Inc in google yields just a heap of irrelevant links. Wikipedia doesn't have a relevant article on INC or @INC either. CL -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: ntp on openbsd rulez
On 15/07/06, Karel Kulhavy [EMAIL PROTECTED] wrote: I just turned it on and date shows the same as on my radio clock! How different from Linux where I didn't know which ntp implementation to use, so I tried installing various ones and it didn't work so I tweaked the configuration somehow according to the (usually ambiguous) documentation and it didn't work either so the result was that the clock was off by hours and I had to manually reset it time to time. You probably did something wrong. The NTP implementation that most Linux distributions are using actually works quite well (also on OpenBSD), but it's too big and in many ways made too complicated. OpenNTPd (which, of course, also runs on Linux) effectively reduces the problem of synching the clock, as you did notice. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: No Java in OpenBSD
On 11/07/06, Andrew Pinski [EMAIL PROTECTED] wrote: On Jul 11, 2006, at 7:26 PM, Karel Kulhavy wrote: I appreciate there is no Java in OpenBSD. I searched for java, jre, jdk, j2se, sun, blackdown and ibm in the packages and didn't find anything. You could just port kaffe or gcj to OpenBSD, I think kaffe already runs on OpenBSD, though there is no official port in OpenBSD itself. There is a port for kaffe in lang/kaffe. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Multiple dmesg in /var/run/dmesg.boot ?
http://marc.theaimsgroup.com/?l=openbsd-miscm=114175733125979w=2 Cheers, Andreas On 11/07/06, Jirtme Loyet [EMAIL PROTECTED] wrote: Hello, I've a stranged issue with openbsd 3.9. I've hacked the installer script to install openbsd automatically. Everything works fine excepted dmesg output. In a normal installation from CD, after N reboot, when I do a dmesg, I've got only the LAST dmesg (the current boot). But with my installer, I've got all the dmesg following. To correct, I've a solution: I replace the dmesg /var/run/dmesg.boot in /etc/rc by dmesg | sed -ne '/^OpenBSD /h;/^OpenBSD /!H;${g;p;}' /var/run/dmesg.boot But it doesn't explain WHY i've got this stranged issue. In my installer, I've replaced every user input by a static value (for tested) and I did'nt touch something else. Thx in advance, ++ Jerome [demime 1.01d removed an attachment of type application/x-pkcs7-signature which had a name of smime.p7s] -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Default ghostscript doesn't work in OpenBSD 3.9?
I can not reproduce this on my current (as of last night) i386 machine. Regards, Andreas On 09/07/06, Karel Kulhavy [EMAIL PROTECTED] wrote: Hello Please try with your OpenBSD 3.9 and default ghostscript install this: [EMAIL PROTECTED]:~$ gs /usr/local/share/ghostscript/7.05/examples/alphabet.ps It's a 1551-byte simple example postscript that comes with Ghostscript and fails for me. I am getting the message Error: /invalidfileaccess in --.outputpage-- I actually get this error for every page I attempt to display with ghostscript. And ggv doesn't work either. CL -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: Open BSD commands
On 29/06/06, Ajith Kumar [EMAIL PROTECTED] wrote: Hi, I have two silly questions.. How to see the memoy details of a OpenBSD machine using commands ? $ sysctl hw.physmem hw.physmem=1073278976 How to see the processor details of a OpenBSD machine using commands ? $ sysctl hw.machine hw.machine=amd64 $ sysctl hw.model hw.model=AMD Athlon(tm) 64 Processor 3400+ $ sysctl hw.ncpu hw.ncpu=1 $ sysctl hw.vendor hw.vendor=Gigabyte Technology Co., Ltd. $ sysctl hw.product hw.product=K8T800-8237 Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: dynamic dns update
Try out the net/ipcheck port. Regards, Andreas On 02/06/06, riwanlky [EMAIL PROTECTED] wrote: Hi, I will like to know if OpenBSD have the capability to update my dynamic ip to www.dyndns.org. I am currently running myDYNIPPRO on Windows to update my dynamic ip. I want to move to OpenBSD. I had currently running sendmail, popa3d, mrtg, mySQL on the machine. Thanks and best regards, Riwan -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: newbie questions
On 22/05/06, Jason Stubbs [EMAIL PROTECTED] wrote: sonjaya wrote: [cut] i have set all router like this : - all PF is disable - in rc.conf i set = routed=-q Also, the setting in /etc/rc.conf (or in /etc/rc.conf.local) is routed_flags, not routed... Be well, Andreas -- Andreas Kahari Somewhere in the general Cambridge area, UK
Re: int vs. long
What are you storing in your ints/longs, what operations are you doing on them, and how significant is the difference in speed that you observe under what cicumstances? Choosing a type based on speed will generate potentially unportable code, whereas choosing a type based on what data you will actually store will be safer. There are type called int_fast32_t, uint_fast64_t etc. (from 8 to 64 bits, both int and uint) in the C standard, in stdint.h. They are supposed to be the fasted integer type of at least the mentioned number of bits. Use these and pick the width that you will actually need. Regards, Andreas ps. You and I talked about something similar before: http://monkey.org/openbsd/archive/misc/0305/msg00448.html The difference is that stdint.h now exists in OpenBSD... On 12/05/06, Gustavo Rios [EMAIL PROTECTED] wrote: Hey folks, i am writing a program to perform some tasks i would like to do. I am running 3.8 on 64 bit box, for now. While playing around with int a long types i could see a performance improvement when using long type over the same method using int type. What is the theory behind this increase on performance? If theory validades the practice, could i infere i should always use long instead of int on my 64 machines? Thanks a lot for your time and cooperation. Best regards. -- Andreas Kahari Somewhere in the general Cambridge area, UK
Problem with uvisor0, comms/pilot-link, and LifeDrive, on i386
at pms0 mux 0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: PC speaker spkr0 at pcppi0 npx0 at isa0 port 0xf0/16: using exception 16 biomask effd netmask effd ttymask pctr: 686-class user-level performance counters enabled mtrr: Pentium Pro MTRR support uhub2 at uhub0 port 2 uhub2: NEC Corporation USB2.0 Hub Controller, rev 2.00/1.00, addr 2 uhub2: 3 ports with 3 removable, self powered ulpt0 at uhub1 port 2 configuration 1 interface 0 ulpt0: Prolific Technology Inc. IEEE-1284 Controller, rev 1.00/2.02, addr 2, iclass 7/1 ulpt0: using bi-directional mode uhidev0 at uhub2 port 2 configuration 1 interface 0 uhidev0: Sun Microsystems Type 6 Mouse, rev 1.00/1.02, addr 3, iclass 3/1 ums0 at uhidev0: 3 buttons wsmouse1 at ums0 mux 0 uhidev1 at uhub2 port 3 configuration 1 interface 0 uhidev1: Sun Microsystems Type 6 Keyboard, rev 1.00/1.01, addr 4, iclass 3/1 ukbd0 at uhidev1: 8 modifier keys, 6 key codes wskbd1 at ukbd0 mux 1 wskbd1: connecting to wsdisplay0 dkcsum: wd0 matches BIOS drive 0x80 root on wd0a rootdev=0x0 rrootdev=0x300 rawdev=0x302 The following added when trying to get the HotSync to work. Then I gave up, mounted an SD card in the LifeDrive, transferred some files, unmounted the card, and tried HotSync'ing again: uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached umass0 at uhub2 port 1 configuration 1 interface 0 umass0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 umass0: using SCSI over Bulk-Only scsibus1 at umass0: 2 targets sd0 at scsibus1 targ 1 lun 0: Toshiba, SD256, 1.0 SCSI0 0/direct removable sd0: 3817MB, 3817 cyl, 64 head, 32 sec, 512 bytes/sec, 7818112 sec total sd1 at scsibus1 targ 1 lun 1: Toshiba, SD256, 1.0 SCSI0 0/direct removable sd1: 243MB, 243 cyl, 64 head, 32 sec, 512 bytes/sec, 498176 sec total umass0: at uhub2 port 1 (addr 5) disconnected sd0 detached sd1 detached scsibus1 detached umass0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT uvisor0: at uhub2 port 1 (addr 5) disconnected uvisor0 detached uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 uvisor0: init failed, TIMEOUT -- Andreas Kahari
Re: Problem with uvisor0, comms/pilot-link, and LifeDrive, on i386
On 17/03/06, Antoine Jacoutot [EMAIL PROTECTED] wrote: Selon Andreas Kahari [EMAIL PROTECTED]: First of all, when I connect the USB cable to my LifeDrive, I get the following lines in my dmesg (see last in this message for full dmesg): uvisor0 at uhub2 port 1 uvisor0: palmOne, Inc. palmOne Handheld, rev 2.00/1.00, addr 5 These are followed after 4 to 5 seconds by uvisor0: init failed, TIMEOUT Hi. I've been seeing the exact same behaviour here. As I sync my LifeDrive using WiFi, I did not further investigate this problem. Do you have a Linux box around (or a live CD) to see if it works with it (or maybe pilot-link USB sync does not work withe this model yet) ? As soon as I have time for this, I'll have a look at it. Hi Antoine, I really would like to sync with my OpenBSD machine as I wouldn't want to have to install Linux for something as trivial as this. Could you please describe how you go about syncing using WiFi? This would be very useful. Thanks, Andreas -- Andreas Kahari
Re: Problem with uvisor0, comms/pilot-link, and LifeDrive, on i386
On 17/03/06, Antoine Jacoutot [EMAIL PROTECTED] wrote: Selon Andreas Kahari [EMAIL PROTECTED]: I really would like to sync with my OpenBSD machine as I wouldn't want to have to install Linux for something as trivial as this. Could you please describe how you go about syncing using WiFi? This would be very useful. First, you need to configure the network/wifi on your Palm and configure hotsync to sync using the network with the wi-fi service. It is explained in the LifeDrive docs I guess, but basically, for the hotsync configuration, all you have to do is : - hotsync, options - computer name (I have a French Palm OS so the exact name might be different) ; enter the IP/Netmask of the computer you wish to sync to. - come back to the hotsync main screen and choose the Network sync (on top of the hotsync icon, there's Local and Network). That's all... of course, your WiFi _must_ be configured for this to work. On you OpenBSD box, if using pilot-link, you can start the network hotsync daemon with the following command (read the docs about pi-csd, I'm not 100% certain about the following line): # /usr/local/bin/pi-csd -H hostname -a 127.0.0.1 -n 255.255.255.0 -q If you're using jPilot, all you have to do is configure your port as: net: Hope that helps... Yes, this helped. I'm now able to HotSync with JPilot, at least on my amd64 machine at home (haven't had time to test on the i386 I was playing with earlier, but I'm sure it will work). Thanks a lot. Regards, Andreas -- Andreas Kahari
Re: ulimits tuning
On 16/03/06, MikeyG [EMAIL PROTECTED] wrote: Hi, Can anyone tell me how the ulimits specified in the default login.conf are derrived? Is it worth changing them if I have one or two+ gigs of ram? I'd also like to force users to play nicer with each other in terms of resources. Some are running things which spawn dozens of hungry processes. However, it looks like most of these limits are on a per process rather than per user basis (AFAICT; the man pages don't say a The limits are on processes within that specific session group of processes, as far as I understand. lot) and don't cause graceful degredation when they're reached. I'm guessing these are really just a safety net to catch run-away processes. Is there any better way to do this sort of thing? I usually play within the limits so I don't often run into them. How would you define graceful degradation when exceeding the alotted memory allocation limit or the limit for the number of processes? Is this (or, should this be) a feature of the OS, the shell, or of the process being limited. I have a feeling that if the process doesn't itself gracefully cope with limits, then there is not very much to be done... Thanks MikeG Andreas -- Andreas Kahari
Re: Can't use some characters in xterm/console
On 14/03/06, Andris Delfino [EMAIL PROTECTED] wrote: I use the ksh shell. Tried csh in an xterm, no problem there (I can use the characters there). So, is something I can tweak to make them work in ksh? Sounds to me you want to un-tweak something that you've been tweaking... Have a look at your ~/.profile and ~/.inputrc (if you have one) and other files ($ENV) that might contain things that you've modified. Try as another user (create a new one even). Regards, Andreas On 3/14/06, David T Harris [EMAIL PROTECTED] wrote: Actually if you're having the same problems on a tty, you might want to ssh in remotely and change your default shell, to see if it's a problem with some config setting in your .kshrc or .bashrc, etc... Have you tried logging in as a different user? Do you still have the same problems regardless of the shell you use? -- Andreas Kahari
Re: Can't use some characters in xterm/console
On 14/03/06, David T Harris [EMAIL PROTECTED] wrote: It depends on what's currently in your .kshrc file. If you want you can just backup your current .kshrc file to some other filename, and then try ksh. If you still have problems then it's probably not a problem with your local settings, but rather with your global ksh settings. If that's the case you'd have to mess around with your global kshrc file. A ~/.kshrc file is only parsed if explicitly asked to do so from ~/.profile or by setting $ENV to ~/.kshrc from ~/.profile. It will not be read in a default setup. Andreas -- Andreas Kahari
Re: ksh93
On 21/02/06, Harry Putnam [EMAIL PROTECTED] wrote: Luke Bakken [EMAIL PROTECTED] writes: I've built it before from that site so am guessing it has grown out of date or become neglected. Do you really need ksh93? pdksh should work just fine in 99.9% of your cases. No, in fact I can't site a single thing it can do that pdkish doesn't. At least not within my usage. I am just used to using it so went looking. A private poster sent a pointer to a message from the ports-cvs developers list that says... Remove the ast-ksh port. Restrictive, inscrutable license; weird build system; code doesn't inspire confidence; mostly broken. I agree fully with the part about `weird build system' and will defer to there notions about code. I'm no programmer. I have looked at the ksh93 port and at the code delivered from ATT for some time. I've worked with the ATT guys (mainly Glenn Fowler) on tracking down a bug somewhere in either our gcc or in their IO library since the variadic function macros caused wierd things to happen on i386 (in one place, an argument got lost between the caller and the called function), but without success. Compiling the shell with gcc 4 on i386 seemed to work, but that's not a good solution for a port. There wasn't a problem on amd64 at that time, and neither on sparc64. I haven't looked at this for a year or so now, and I'm not planning to in the near future since, as was mentioned, pdksh is good enough for most purposes. The thing I sometimes miss (i.e. that would be useful to have from time to time) in pdksh are: 1. Floating point arithmetics 2. Structs 3. The automatic manual-generation stuff Cheers, Andreas -- Andreas Kahari
Re: Is unix domain UDP reliable?
On 04/02/06, Alexander Farber [EMAIL PROTECTED] wrote: Do datagrams arrive in order and without loss when using unix domain on OpenBSD? I think it's safest to say that when you use SOCK_DGRAM, you get unreliable messages. The socket(2) manual says so and unix(4) doesn't say otherwise for the UNIX domain. -- Andreas Kahari
Re: Safety of a shutdown when no user could log in
On 26/01/06, Andris Delfino [EMAIL PROTECTED] wrote: What I'm trying to ask is this: if a user turns on the computer, and can't log in, is it safe to power off the computer without using halt, or shutdown, (ie. pressing the power off button)? No. There quite a few things that might be going on on a Unix system, even when no user is logged in, maybe especially when it was just rebooted. Good luck Good luck? -- Andreas Kahari
Re: pid of last started process
Dimaz, #!/bin/ksh somecommand echo PID of last backgrounded command is $! Read the manual for more info. Andreas On 20/12/05, dMITRIJ lEBEDX [EMAIL PROTECTED] wrote: Sorry, may be I've written in wrong place, but what variable contained pid of last started process from this shell (script) in ksh? -- Andreas Kahari
Re: script
rm -rf directory Re-read the rm(1) manual, and be sure you know what you're doing before you do it. Cheers, Andreas On 13/12/05, Ricardo Lucas [EMAIL PROTECTED] wrote: Hi all, does anyone knows a script or even a little program that remove all files and subdirectories and his respective files from a folder? I've read the man of rm and rmdir but seems like they can't do that. Thanks -- Ricardo Lucas -- Andreas Kahari
Re: a truly openbsd day
On 31/10/05, Kevin [EMAIL PROTECTED] wrote: As a desktop OS, it's unfortunately a bit difficult to setup with everything needed by the average desktop user who doesn't care what their OS is. This makes me wonder - a desktop OpenBSD fork... Not forking in the strictest sense - pc-bsd is not exactly a fork of FreeBSD but more a preconfigured installation and some userland X tools to simplify package management. A nice X frontend for package installation and a modern window manager, together with some hardware config tools and we'll have a perfect desktop OpenBSD Alternately, a LiveCD distribution along the lines of FreeSBIE, to show off the usability and security of OpenBSD on the desktop. A starting point might be http://www.onlamp.com/pub/a/bsd/2005/07/14/openbsd_live.html I'd love to see a bootable OpenBSD desktop CD with all applications tightly wrapped by systrace, so I don't need to recreate and redistribute the boot disk after each new Firefox, GAIM, etc exploit. Kevin I think it would be more useful with a m0n0wall-type distribution image. So far, I haven't seen one, but I haven't looked very hard either. -- Andreas Kahari
Re: a truly openbsd day
On 31/10/05, Gareth Nelson [EMAIL PROTECTED] wrote: I tell people of the joy of puffy everywhere I go, at the busstop I shout THEY CALLED IT BSD AND OPEN BECAUSE IT'S ALWAYS FREE Seriously though, I now recommend OpenBSD to everyone as a firewall/server system for those migrating from that redmond thing. As a desktop OS, it's unfortunately a bit difficult to setup with everything needed by the average desktop user who doesn't care what their OS is. This makes me wonder - a desktop OpenBSD fork, similar to pc-bsd but based on FreeBSD might be a good idea. I've used OpenBSD on my desktop machines at work and at home for five years now, and there's nothing that I need to do that I can not do. I use OpenBSD because it's the BSD which I have found easiest to set up and use. I'm not the average computer usert though, but possibly quite close to being the average OpenBSD user. My firewall at home runs FreeBSD (m0n0wall on soekris) ;-) Fork however much you want, but I think it would not be constructive. -- Andreas Kahari
Re: sh-script executing
On 06/10/05, Ilya A. Kovalenko [EMAIL PROTECTED] wrote: TK just edit a copy, chmod +x and mv(1) it into place. Slightly complicated, but works, because mv(1) removes old file, so sh(1) working either old version or new one (no hybrids). Yes, sh(1) will probably keep a descriptor to the old file and keep using it until done. However, does this have any kind of other implications? The behaviour that Ilya pointed out would not occur to me to be expected... -- Andreas Kahari
Re: Documentation bug in WWW FAQ???
On 03/10/05, Bryan [EMAIL PROTECTED] wrote: I recently attempted to dualboot my laptop with Windows XP. I was following the FAQ and came to the point where I issued this command: First you say: dd if=/dev/rsd0a of=openbsd.pbr bs=512 count=1 later you quote the docs: # dd if=/dev/rwd0a of=/mnt/openbsd.pbr bs=512 count=1 I see rwd0a in the document, not rsd0a. Andreas -- Andreas Kahari
Re: Documentation bug in WWW FAQ???
On 03/10/05, Bryan [EMAIL PROTECTED] wrote: On 10/3/05, Andreas Kahari [EMAIL PROTECTED] wrote: On 03/10/05, Bryan [EMAIL PROTECTED] wrote: I recently attempted to dualboot my laptop with Windows XP. I was following the FAQ and came to the point where I issued this command: First you say: dd if=/dev/rsd0a of=openbsd.pbr bs=512 count=1 This is what is found on the WWW FAQ. Using this, I get the /dev/rsd0a is not configured and I am unable to get a .pbr file to dualboot my laptop. http://www.openbsd.org/faq/faq4.html#Multibooting later you quote the docs: # dd if=/dev/rwd0a of=/mnt/openbsd.pbr bs=512 count=1 This command works for me, it's on the following website: http://darkuncle.net/OpenBSD/OpenBSD_dualboot.txt I see rwd0a in the document, not rsd0a. Ah, now I see what you're typing. Yes, that part of the FAQ is only really valid if you boot from a SCSI drive. Some people do, some people don't. You obviously do not, so you naturally need to specify your IDE drive instead. Andreas -- Andreas Kahari
Catching WINCH signal during sleep...
Hi, I'm running the following simple test script: #!/bin/ksh -x trap 'eval $(resize)' WINCH while true; do sleep 10 done What I'm noticing is that the WINCH signal action is not actually carried out until at the end of the sleep, should the signal be sent during the sleep period. I'm wondering if this is the behaviour I should expect or not. I initially expected the signal to interrupt the sleep. The SUSv3 documentation for the sleep(1) utility says The sleep utility shall take the standard action for all other signals [other than ALRM]. (for the ALRM signal, there is a number of things that could happen, which is not interesting right now). (the WINCH signal is delivered when the terminal window changes size) Any thoughts? Regards, Andreas -- Andreas Kahari
Re: Catching WINCH signal during sleep...
On 19/09/05, Damien Miller [EMAIL PROTECTED] wrote: Andreas Kahari wrote: (the WINCH signal is delivered when the terminal window changes size) SIGWINCH is ignored by default, otherwise your sleep(1) would exit if you changed the size of your xterm. See signal(3) for the full list. Ok, so sleep(1) is explicitly ignoring the signal. Can I get it be interrupted by the signal instead? No, maybe that won't solve my problem because the installed handler ('eval $(resize)') wouldn't be run, I guess. So it is doing the right thing wrt your quote of SUSv3: Yes, that's probably right. I'll work around it somehow. Thanks, Andreas -- Andreas Kahari
Re: tcpdump/pflog - rule numbering
I have a scrub all fragment reassemble showing up on the first line of pfctl -s rules. The rules are numbered from 0 (zero). Therefore I need to add 2 to the line number of the pfctl output to get the right rule. The log entry Sep 04 21:45:56.156323 rule 8/(match) pass in on fxp0: xxx.xxx.xxx.xxx.39665 yyy.yyy.yyy.yyy.22: S 224562907:224562907(0) win 5840 mss 1460,nop,wscale 0 (DF) ...corresponds to # pfctl -s rules | sed -n '10p' pass in log on fxp0 proto tcp from any to (fxp0) port = ssh flags S/SA keep state Andreas On 06/09/05, Stephan A. Rickauer [EMAIL PROTECTED] wrote: My 'tcpdump -n -e -i pflog0' generates lines like these: 11:22:12.538707 rule 267/(match) block in on em0: 172.16.2.97.32790 225.4.5.6.6001: udp 341 [ttl 1] I am now trying to find out, what 'rule 267' should be and found posts regarding 'pfctl -s rules'. My problem is, that rule number 267 has absolutely nothing to do with the line logged above. pfctl -s rules | sed -e '1,266d' -e '268,$d': pass out log quick inet proto tcp from 172.16.2.178 port = 1023 to id431E1F62.2 port = 4899 keep state label [RULE:18 - IF:global - ACTION:ACCEPT] I couldn't find any detailed information about how pflog numbers the rules. Could anyone point me there? Thanks! -- Stephan A. Rickauer Institut f|r Neuroinformatik Universitdt / ETH Z|rich Winterthurerstriasse 190 CH-8057 Z|rich Tel: +41 44 635 30 50 Sek: +41 44 635 30 52 Fax: +41 44 635 30 53 http://www.ini.ethz.ch -- Andreas Kahari
Re: Active Swap space
It is enabled at all times but on OpenBSD, it is not used until needed. See also swapctl -l and swapctl(8). Andreas On 06/09/05, Joco Salvatti [EMAIL PROTECTED] wrote: Hi all, I have a OpenBSD system acting as a firewall. When I use the top command I see that the swap space is not being used. I'd like to know if the swap space is only enabled when the system needs it or if it's enabled just when the system comes up. Thanks -- Joco Salvatti Undergraduating in Computer Science Federal University of Para - UFPA web: http://salvatti.expert.com.br e-mail: [EMAIL PROTECTED] -- Andreas Kahari
Re: Floppy problems... (fdc missing in /dev)
Try actually reading that manual on fdc as well. It says: The standard names of a floppy drive will take the form /dev/fd{0,1,2,3}{,B,C,D,E,F,G,H}[a-p]. Cheers, Andreas On 05/09/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello everybody, I've noticed that fdc isn't in /dev/. I noticed it during I tried to boot a floppy. 1. I checked the FD-Device # dmesg | grep fd fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 biomask fff5 netmask fffd ttymask fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 biomask fff5 netmask fffd ttymask 2. I tried to boot the floppy # mount -t msdos /dev/fdc0 floppy/ mount_msdos: /dev/fdc0 on /mnt/floppy: No such file or directory 3. Getting confused and checked /dev # ls /dev/fdc* ls: /dev/fdc*: No such file or directory # man -k fdc fdc (4) - NEC765 compatible floppy disk driver Did I made something wrong (it's a 3.7 oBSD) or why does fdc still not exist? That's a littlebit confusing...I think. Kind regards, Sebastian -- Don't buy anything from YeongYang. Their Computercases are expensiv, they WTX-powersuplies start burning and their support refuse any RMA even there's still some warenty. -- Andreas Kahari
Re: Added African whois server to whois(1)
On 12/08/05, Henning Brauer [EMAIL PROTECTED] wrote: * Andreas Kahari [EMAIL PROTECTED] [2005-08-12 16:56]: On 12/08/05, Henning Brauer [EMAIL PROTECTED] wrote: * Andreas Kahari [EMAIL PROTECTED] [2005-08-12 15:47]: [cut] -f Use the African Network Information Center (AfriNIC) database. It contains network numbers registered on the African continent. I am not sure it makes sense to add these kind of abbreviations to our whois. NICs come and go, we'll soon run out of letters. I'd much prefer making $ whois 1.2.3.4 Just Work, but I haven't looked into that. I agree with that principle, but Africa is one of the big land areas out there, with a lot of countries on it, just like Asia and Europe, and I thought it would make sense to their AfriNIC in there just like we have APNIC and RIPE. well, the point is, I consider the existance of the shorthands for RIPE and APNIC and ARIN whois as historic failure that doesn't need to be repeated... I see you point and I agree. -- Andreas Kahari
Added African whois server to whois(1)
Hi, I added the African Network Information Center (AfriNIC) whois server to a new switch (-f) in the whois(1) utility. A simple diff for whois.c and whois.1 is attached. The new part of the manual says: -f Use the African Network Information Center (AfriNIC) database. It contains network numbers registered on the African continent. I'm not quite sure how to make whois(1) automatically follow referrals to AfriNIC for African IPs in the way ARIN referrals to e.g. RIPE are followed... Regards, Andreas -- Andreas Kahari --- whois.c.origFri Aug 12 13:32:45 2005 +++ whois.c Fri Aug 12 13:49:21 2005 @@ -48,6 +48,7 @@ #defineINICHOSTwhois.networksolutions.com #defineCNICHOSTwhois.corenic.net #defineDNICHOSTwhois.nic.mil +#define AFNICHOST whois.afrinic.net #defineGNICHOSTwhois.nic.gov #defineANICHOSTwhois.arin.net #defineRNICHOSTwhois.ripe.net @@ -80,7 +81,7 @@ country = host = server = NULL; flags = rval = 0; - while ((ch = getopt(argc, argv, aAc:dgh:ilmp:qQrR6)) != -1) + while ((ch = getopt(argc, argv, aAc:dfgh:ilmp:qQrR6)) != -1) switch (ch) { case 'a': host = ANICHOST; @@ -93,6 +94,9 @@ break; case 'd': host = DNICHOST; + break; + case 'f': + host = AFNICHOST; break; case 'g': host = GNICHOST; --- whois.1.origFri Aug 12 13:36:33 2005 +++ whois.1 Fri Aug 12 13:47:44 2005 @@ -87,6 +87,9 @@ Use the US Department of Defense database. It contains points of contact for subdomains of .Tn \.MIL . +.It Fl f +Use the African Network Information Center (AfriNIC) database. +It contains network numbers registered on the African continent. .It Fl g Use the US non-military federal government database, which contains points of contact for subdomains of
Re: Added African whois server to whois(1)
On 12/08/05, Henning Brauer [EMAIL PROTECTED] wrote: * Andreas Kahari [EMAIL PROTECTED] [2005-08-12 15:47]: Hi, I added the African Network Information Center (AfriNIC) whois server to a new switch (-f) in the whois(1) utility. A simple diff for whois.c and whois.1 is attached. The new part of the manual says: -f Use the African Network Information Center (AfriNIC) database. It contains network numbers registered on the African continent. I am not sure it makes sense to add these kind of abbreviations to our whois. NICs come and go, we'll soon run out of letters. I'd much prefer making $ whois 1.2.3.4 Just Work, but I haven't looked into that. I agree with that principle, but Africa is one of the big land areas out there, with a lot of countries on it, just like Asia and Europe, and I thought it would make sense to their AfriNIC in there just like we have APNIC and RIPE. I will need to look more closely on how to automatically look up AfriNIC when a RIPE entry refers to it. I'm a bit short on time right now, but might give it a go next week unless someone could point me in the right direction (or simply makes it happen somehow). Cheers, Andreas -- Andreas Kahari
Re: Added African whois server to whois(1)
On 12/08/05, Martin Schrvder [EMAIL PROTECTED] wrote: On 2005-08-12 16:06:03 +0200, Henning Brauer wrote: whois. NICs come and go, we'll soon run out of letters. I'd much prefer making $ whois 1.2.3.4 Just Work, but I haven't looked into that. Use whois.thur.de as server Why? For the IP 80.248.70.99 (an IP in Togo), this just gives me the same info as from RIPE... AfriNIC gives more details. -- Andreas Kahari
Re: Shell scripting problem -- help, please!
See sh(1), under Command execution: [...] Just to confuse things, if the posix option is turned off (see the set command below), some special commands are very special in that no field splitting, file globbing, nor tilde expansion is performed on arguments that look like assignments. Andreas On 03/08/05, Dave Anderson [EMAIL PROTECTED] wrote: Something's screwy here, using the 'set -A' command in /bin/sh on 3.7-release. AFAICT the complicated file-match expression should (in this case) produce the same results as the simple one, but it doesn't seem to match at all when used in this script -- but does produce the expected result when cut-and-pasted to a command line. Any constructive comments would be greatly appreciated. Dave The results: match = '/var/log/pf/103790/*' files[0] = '/var/log/pf/103790/ne3.in.block.destIP' files[1] = '/var/log/pf/103790/ne3.in.block.destPort' files[2] = '/var/log/pf/103790/ne3.in.block.srcIP' match = '/var/log/pf/103790/+([a-zA-Z])+([0-9]).@(in|out).@(block|pass).@(destIP|destPort|srcIP)' files[0] = '/var/log/pf/103790/+([a-zA-Z])+([0-9]).@(in|out).@(block|pass).@(destIP|destPort|srcIP)' The script: #! /bin/sh function DoIt { set -A files $1 echo match = '$1' typeset -i idx idx=0 while [ idx -lt ${#files[*]} ] ; do echo files[$idx] = '${files[$idx]}' idx=idx+1 done return 0 } DoIt /var/log/pf/103790/* echo DoIt /var/log/pf/103790/+([a-zA-Z])+([0-9]).@(in|out).@(block|pass).@(destIP|destPort|srcIP) -- Andreas Kahari PGP: 1024D/C2E163CB
Re: Disable IPv6 on 3.7
See the archives. Here's is one example: http://marc.theaimsgroup.com/?l=openbsd-miscm=109473296323761w=2 Andreas On 25/07/05, Gordon Ross [EMAIL PROTECTED] wrote: Is it possible to disable IPv6 on OpenBSD 3.7 without building a custom kernel ? -- Andreas Kahari PGP: 1024D/C2E163CB