dhclient lease declarations broken in current snapshots

2014-11-20 Thread Alessandro DE LAURENZIS
Folks,

just updated to latest snapshot (Nov 20):

root@poseidon:[~] uname -a
OpenBSD poseidon.atlantide.net 5.6 GENERIC.MP#579 amd64

and noticed that lease declarations in /etc/dhclient.conf no longer
work:

root@poseidon:[~] cat /etc/dhclient.conf 
# $OpenBSD: dhclient.conf,v 1.2 2011/04/04 11:14:52 krw Exp $
#
# DHCP Client Configuration
#
# See dhclient.conf(5) for possible contents of this file.
# When empty default values are used:
#
# Example:
#
# send dhcp-lease-time 3600;
# send host-name myhost;
# supersede host-name myhost;
# supersede domain-name my.domain;
# request subnet-mask, broadcast-address, time-offset, routers,
#   domain-name, domain-name-servers, host-name, lpr-servers, ntp-servers;
# require subnet-mask, domain-name-servers, routers;
initial-interval 1;
send host-name poseidon;
request subnet-mask, broadcast-address, routers, domain-name,
domain-name-servers, host-name;

# Lease declarations (fallback)
lease {
interface trunk0;
fixed-address 192.168.1.103;
option subnet-mask 255.255.255.0;
option routers 127.0.0.1;
option domain-name-servers 127.0.0.1;
option dhcp-lease-time 259200;
renew  4 2020/12/31 23:59:59 UTC;
rebind 4 2020/12/31 23:59:59 UTC;
expire 4 2020/12/31 23:59:59 UTC;
}

root@poseidon:[~] dhclient iwn0
/etc/dhclient.conf line 24: wrong interface name.
interface trunk0
  ^
Segmentation fault

Commenting out the lease section, all works as expected.

Am I missing something?

-- 
Alessandro DE LAURENZIS
[mailto:just22@gmail.com]
LinkedIn: http://it.linkedin.com/in/delaurenzis



Re: USB worked on 5.5, not on 5.6 on MacbookAir5,1

2014-11-20 Thread Martin Pieuchot
On 19/11/14(Wed) 11:39, Scott Bonds wrote:
  I don't know what you mean by unreliable nor which snapshot you
  tried, that sad for me, 'cause I cannot learn from your experience :/
 
 Sorry about that Martin, I'll try to be more helpful by providing more
 details. The snapshot I tried and found to be unreliable was amd64
 bsd.mp 2014-11-14.

 By unreliable I mean this: I plugged in my axe network adapter, which is
 100% rock solid under 5.5. Under -current@20141114 after a few minutes
 of use, the axe0 stops working. I try to ping a known good host and it
 drops all the packets. Running 'ifconfig axe0 down' then 'ifconfig axe0 up
  dhclient axe0' restores functionality for a few minutes, then it goes
 down again. Same behavior with a urtwn. When booting off of a USB2
 thumbdrive everything works for 5 minutes or so, but at some point the
 light on the drive stops flashing and any command I type in never
 returns. I can keep typing (so the internal EHCI controller seems ok)
 but nothing happens besides what I type showing up on the screen. I can
 reproduce this misbehavior on both the 20141114 and the 20141118 snaps.

Thanks for the information.  

  Well you still have an ehci(4) controller on your machine, how does it
  work on -current?
 
 I believe my MacbookAir5,1 has a number of *internal* EHCI ports for
 stuff like the keyboard to connect to, plus 2 *external* XHCI ports for
 me to plug peripherals into.
 
 The internal EHCI ports seem to work fine on -current. The external
 ports show up as XHCI ports on -current and exhibit the problems I
 described above.
 
 To hazard a guess on why my ports worked in 5.5 and earlier as EHCI
 ports, do not work at all in 5.6, and show up as XHCI ports in -current:
 the BIOS is capable of falling back to EHCI if the OS doesn't ask for
 XHCI ports. 5.5 and earlier only asked for EHCI ports, so that's what
 the BIOS provided. 5.6 asks for XHCI ports, the BIOS provides them
 instead of emulating EHCI ports, but 5.6 doesn't actually support XHCI
 ports yet, so they are unusable in 5.6. -current adds support of XHCI
 ports, and asks the BIOS for XHCI ports, so things are working again, at
 least at a basic level.
 
 If my guess is somewhat right, a fix or workaround for 5.6 might be to
 somehow return to the old behavior of pretending the OS knows nothing of
 XHCI and ask the BIOS to provide EHCI ports at boot.

I don't know how it works in Apple machines but other people reported
such weird thing with machine having an xhci(4)/ehci(4) controller.
Telling the BIOS to deactivate USB 3 support made their ports work
again with ehci(4), do you have a way to do that on your MacbookAir5,1?

  Be it on -current or 5.6, could you post the output of usbdevs -dv
  or even better lsusb -v (from the usbutils package) with your
  devices attached but not recognized?
 
 Yes. Here are the usbdev, usbdev -dv, lsusb, and lsusb -v outputs for
 this machine with a urtwn plugged into the external USB port on the left
 side, for both 5.5-stable-i386 and -current@20141118-amd64. Note: for
 current I booted off of a USB thumbdrive, so you'll see that too on
 those outputs.

Thanks for this info.



Possibility for support of Qualcomm Atheros QCA8171

2014-11-20 Thread bodie

Hi all,

is anyone by anychance working on this LAN device support in OpenBSD? 
Not sure how much portable and applicable is eg. code from FreeBSD for 
that.


$ sudo lspci -vx -s 07:00.0
07:00.0 Ethernet controller: Qualcomm Atheros QCA8171 Gigabit Ethernet 
(rev 10)

Subsystem: Lenovo Device 3800
Flags: bus master, fast devsel, latency 0, IRQ 50
Memory at c250 (64-bit, non-prefetchable) [size=256K]
I/O ports at 3000 [size=128]
Capabilities: [40] Power Management version 3
Capabilities: [58] Express Endpoint, MSI 00
Capabilities: [c0] MSI: Enable+ Count=1/16 Maskable+ 64bit+
Capabilities: [d8] MSI-X: Enable- Count=16 Masked-
Capabilities: [100] Advanced Error Reporting
Capabilities: [180] Device Serial Number 
ff-3d-9c-de-28-d2-44-ff

Kernel driver in use: alx
00: 69 19 a1 10 07 00 10 00 10 00 00 02 10 00 00 00
10: 04 00 50 c2 00 00 00 00 01 30 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 aa 17 00 38
30: 00 00 00 00 40 00 00 00 00 00 00 00 07 01 00 00

$



Re: HDD not found

2014-11-20 Thread Dutch Ingraham

On 11/19/14 22:27, Nick Holland wrote:

On 11/19/14 19:38, Dutch Ingraham wrote:

On 11/19/14 18:18, Bertrand Janin wrote:

Dutch Ingraham wrote :

Just asking for a sanity check.  I tried installing 5.6 from CD on a
WD1600AAJS HDD and was presented with Available disks are: none.  This
seems to be a fairly mainstream drive around for several years (mine being
manufactured in 2010), so I just want to check whether I've missed some
critical install instruction.  I followed section 4.5 of the FAQ and
accepted default settings and used entire disk.

...

I don't think it's a drive problem, it doesn't seem to find your disk
controller at all. I would go in the BIOS and play with the disk controller
settings.

-b


Absolutely.  Disks are disks.  it's the interface that you were missing.




Excellent - thank you, Bertrand.

For anyone else with this particular issue and BIOS version, note that
the SATA Operation option may need to be set to legacy.


That's best avoided, and I suspect you can.
I suspect you went from Worst setting to second worst setting.
Looks like your system was set to RAID originally.  Most of these
systems have two options -- AHCI and Legacy, some have the third
option of RAID.  You don't want RAID...it is software-only RAID, and
under some conditions you can have the BIOS clobber data on the second
disk that your non-SW RAID OS set up as a second disk.

OpenBSD was one of the first OSs to disable the support of those
controlers in that mode to prevent problems, but at least some Linux
systems do now, too.

AHCI is a huge performance boost over legacy in general, and in some
cases, the legacy support is horrifically slow, slower than the old
pciide interfaces that never dreamed of AHCI.

Good news is if you flip it from Legacy to AHCI, things will Just
Work if you used DUIDs during setup.

Nick.


Thanks for that elucidation, Nick.  You are correct that the initial 
setting was RAID On.  This BIOS actually has four choices:


RAID Autodetect / AHCI
RAID Autodetect / ATA
RAID On
Legacy

I did use DUIDs during setup.  I'll take the opportunity to look into 
this further.  Thanks again.




Re: patch for FAQ14

2014-11-20 Thread Daniel Jakots
On Sun, 16 Nov 2014 20:09:35 +0100, Daniel Jakots
vigdis+o...@chown.me wrote:

 I wanted to add some content to FAQ14

Here it is.

This can be useful for people who want to encrypt only their /home or
people who want to automatically mount another disk encrypted at boot
(me).

Cheers,
Daniel

Index: faq14.html
===
RCS file: /cvs/www/faq/faq14.html,v
retrieving revision 1.247
diff -u -p -u -p -r1.247 faq14.html
--- faq14.html  18 Nov 2014 02:00:07 -  1.247
+++ faq14.html  20 Nov 2014 15:29:41 -
@@ -3057,6 +3057,41 @@ and
 a 
href=http://www.openbsd.org/cgi-bin/man.cgi?query=softraidamp;sektion=4;softraid(4)/a
 on your system.
 
+h4Mounting a cryptographic softraid volume at boot/h4
+
+This setup can be used for additional softraid volumes which don't
+contain the root partition.
+
+p
+You need to know the a href=faq14.html#DUIDDUID/as of the
+physical device and the one of the softraid volume.
+
+blockquotepre
+$ bdisklabel sd0 | grep duid/b
+duid: 4d498d4248c8d056
+$ bdisklabel sd1 | grep duid/b
+duid: b1e264fc29000110
+/pre/blockquote
+
+We will use i/etc/rc.local/i to decrypt, do a minor fsck check and
+finally mount the volume. We use the DUID of the physical disk:
+
+blockquotepre
+# becho bioctl -c C -l 4d498d4248c8d056.m softraid0  /etc/rc.local/b
+# becho \check /data\; fsck -p /data; mount -s /data  /etc/rc.local/b
+/pre/blockquote
+
+We add the entry of the partition in i/etc/fstab/i with the DUID
+of the crypto volume. We also add the flag inoauto/i so the system
+doesn't try to mount it with the other partitions as they're mounted
+before i/etc/rc.local/i is run thus the crypto volume doesn't exist
+for the system, yet.
+
+blockquotepre
+# becho b1e264fc29000110.p /data ffs \/b
+  b rw,nodev,nosuid,noauto 0 0  /etc/fstab/b
+/pre/blockquote
+
 h4I forgot my passphrase!/h4
 Sorry.
 This is real encryption, there's not a back door or magic unlocking



Re: patch for FAQ14

2014-11-20 Thread Janne Johansson
Please don't mix you and we in the text on who is doing what.


2014-11-20 16:34 GMT+01:00 Daniel Jakots vigdis+o...@chown.me:

 On Sun, 16 Nov 2014 20:09:35 +0100, Daniel Jakots
 vigdis+o...@chown.me wrote:

  I wanted to add some content to FAQ14

 Here it is.

 This can be useful for people who want to encrypt only their /home or
 people who want to automatically mount another disk encrypted at boot
 (me).

 Cheers,
 Daniel

 Index: faq14.html
 ===
 RCS file: /cvs/www/faq/faq14.html,v
 retrieving revision 1.247
 diff -u -p -u -p -r1.247 faq14.html
 --- faq14.html  18 Nov 2014 02:00:07 -  1.247
 +++ faq14.html  20 Nov 2014 15:29:41 -
 @@ -3057,6 +3057,41 @@ and
  a href=
 http://www.openbsd.org/cgi-bin/man.cgi?query=softraidamp;sektion=4
 softraid(4)/a
  on your system.

 +h4Mounting a cryptographic softraid volume at boot/h4
 +
 +This setup can be used for additional softraid volumes which don't
 +contain the root partition.
 +
 +p
 +You need to know the a href=faq14.html#DUIDDUID/as of the
 +physical device and the one of the softraid volume.
 +
 +blockquotepre
 +$ bdisklabel sd0 | grep duid/b
 +duid: 4d498d4248c8d056
 +$ bdisklabel sd1 | grep duid/b
 +duid: b1e264fc29000110
 +/pre/blockquote
 +
 +We will use i/etc/rc.local/i to decrypt, do a minor fsck check and
 +finally mount the volume. We use the DUID of the physical disk:
 +
 +blockquotepre
 +# becho bioctl -c C -l 4d498d4248c8d056.m softraid0 
 /etc/rc.local/b
 +# becho \check /data\; fsck -p /data; mount -s /data 
 /etc/rc.local/b
 +/pre/blockquote
 +
 +We add the entry of the partition in i/etc/fstab/i with the DUID
 +of the crypto volume. We also add the flag inoauto/i so the system
 +doesn't try to mount it with the other partitions as they're mounted
 +before i/etc/rc.local/i is run thus the crypto volume doesn't exist
 +for the system, yet.
 +
 +blockquotepre
 +# becho b1e264fc29000110.p /data ffs \/b
 +  b rw,nodev,nosuid,noauto 0 0  /etc/fstab/b
 +/pre/blockquote
 +
  h4I forgot my passphrase!/h4
  Sorry.
  This is real encryption, there's not a back door or magic unlocking




-- 
May the most significant bit of your life be positive.



apcupsd via USB on 5.6

2014-11-20 Thread Steven Surdock
I just upgrade from 5.5 to 5.6 on i386 and apcupsd won't recognize my UPS 
plugged into a USB port.  On 5.5 the UPS was attached to ugen0 but on 5.6 it 
say uhidev0.  Apcupsd mentions that the uhidev0 device type won't work.  I see 
that I can get some info from sensord (which is cool).  Any suggestions for 
getting the UPS working with apcupds?

Oct 22 16:16:42 builder02 /bsd: ugen0 at uhub1 port 1 American Power 
Conversion Smart-UPS 1500 FW:601.3.D USB FW:1.3 rev 1.10/0.06 addr 2

Nov 20 08:54:27 builder02 /bsd: uhidev0 at uhub1 port 1 configuration 1 
interface 0 American Power Conversion Smart-UPS 1500 FW:601.3.D USB FW:1.3 
rev 1.10/0.06 addr 2

-Steve S.



Re: patch for FAQ14

2014-11-20 Thread Daniel Jakots
On Thu, 20 Nov 2014 16:57:08 +0100, Janne Johansson
icepic...@gmail.com wrote:

 Please don't mix you and we in the text on who is doing what.
 

Indeed, thanks.
A new version with the wording more consistent with the general tone
(I hope).

Index: faq14.html
===
RCS file: /cvs/www/faq/faq14.html,v
retrieving revision 1.247
diff -u -p -u -p -r1.247 faq14.html
--- faq14.html  18 Nov 2014 02:00:07 -  1.247
+++ faq14.html  20 Nov 2014 16:09:38 -
@@ -3057,6 +3057,42 @@ and
 a 
href=http://www.openbsd.org/cgi-bin/man.cgi?query=softraidamp;sektion=4;softraid(4)/a
 on your system.
 
+h4Mounting a cryptographic softraid volume at boot/h4
+
+This setup can be used for additional softraid volumes which don't
+contain the root partition.
+
+p
+You need to know the a href=faq14.html#DUIDDUID/as of the
+physical device and the one of the softraid volume.
+
+blockquotepre
+$ bdisklabel sd0 | grep duid/b
+duid: 4d498d4248c8d056
+$ bdisklabel sd1 | grep duid/b
+duid: b1e264fc29000110
+/pre/blockquote
+
+Use i/etc/rc.local/i to decrypt, do a minor fsck check and
+finally mount the volume and be sure to use the DUID of the physical
+disk:
+
+blockquotepre
+# becho bioctl -c C -l 4d498d4248c8d056.m softraid0  /etc/rc.local/b
+# becho \check /data\; fsck -p /data; mount -s /data  /etc/rc.local/b
+/pre/blockquote
+
+Add the entry of the partition in i/etc/fstab/i with the DUID
+of the crypto volume with the flag inoauto/i so the system
+doesn't try to mount it with the other partitions as they're mounted
+before i/etc/rc.local/i is run thus the crypto volume doesn't exist
+for the system, yet.
+
+blockquotepre
+# becho b1e264fc29000110.p /data ffs \/b
+  b rw,nodev,nosuid,noauto 0 0  /etc/fstab/b
+/pre/blockquote
+
 h4I forgot my passphrase!/h4
 Sorry.
 This is real encryption, there's not a back door or magic unlocking



question about raw disk devices

2014-11-20 Thread Luca Ferrari
Hi all,
this may sound trivial, in the case please insult me, but I've a
little doubt about disk devices.
In the OpenBSD way there are two devices: a block one and a character
one (and I believe this is the rightmost way). You do low level
operations on the raw device and mount the  block device.
On other Unix operating system there is a single character device on
which you do low level operations and that you can mount.
On pretending-to-be-unix operating system you have a single block
device on which you can do both low level and mounting operations.
Now, the raw device in OpenBSD is just an alias of the block device
(or vice versa) and there is no caching of data outside the vnode
layer, or is there a more complex eplaination?

Thanks,
Luca



Re: question about raw disk devices

2014-11-20 Thread bodie

On 20.11.2014 18:07, Luca Ferrari wrote:

Hi all,
this may sound trivial, in the case please insult me, but I've a
little doubt about disk devices.
In the OpenBSD way there are two devices: a block one and a character
one (and I believe this is the rightmost way). You do low level
operations on the raw device and mount the  block device.
On other Unix operating system there is a single character device on
which you do low level operations and that you can mount.
On pretending-to-be-unix operating system you have a single block
device on which you can do both low level and mounting operations.
Now, the raw device in OpenBSD is just an alias of the block device
(or vice versa) and there is no caching of data outside the vnode
layer, or is there a more complex eplaination?

Thanks,
Luca



You mean behind this one? http://www.openbsd.org/faq/faq14.html

Then from http://www.openbsd.org/faq/faq9.html

The names of hard disks are usually /dev/wd (IDE) and /dev/sd (SCSI or 
devices emulating SCSI disks)


OpenBSD/i386, amd64, and several other platforms use a two layer disk 
partitioning system, where the first layer is the fdisk, BIOS-visible 
partition, familiar to most users of IBM compatible computers. The 
second layer is the disklabel, a traditional BSD partitioning system. 
OpenBSD supports up to 15 disklabel partitions on a disk, all residing 
within one fdisk partition. This permits OpenBSD to coexist with other 
OSs, including other Unix-like OSs. OpenBSD must be one of the four 
primary partitions.


man disklabel
man fdisk in which you can find eg.

 disk
Specify the disk to operate on. It can be specified either by its 
full pathname or an abbreviated disk form. In its abbreviated form, the 
path to the device, the ‘r’ denoting “raw device”, and the 
partition letter, can all be omitted. For example, the first IDE disk 
can be specified as either /dev/rwd0c, /dev/wd0c, or wd0.


Generally FAQ is recommended reading for start, but in simplified form 
any disk device in /dev starting with r is raw (character), without r 
it's block device plus you have BSD partitions where c means whole your 
disk, a is /, b is swap and rest is completely on you.




Re: question about raw disk devices

2014-11-20 Thread Ted Unangst
On Thu, Nov 20, 2014 at 18:07, Luca Ferrari wrote:
 Hi all,
 this may sound trivial, in the case please insult me, but I've a
 little doubt about disk devices.
 In the OpenBSD way there are two devices: a block one and a character
 one (and I believe this is the rightmost way). You do low level
 operations on the raw device and mount the  block device.
 On other Unix operating system there is a single character device on
 which you do low level operations and that you can mount.
 On pretending-to-be-unix operating system you have a single block
 device on which you can do both low level and mounting operations.
 Now, the raw device in OpenBSD is just an alias of the block device
 (or vice versa) and there is no caching of data outside the vnode
 layer, or is there a more complex eplaination?

The block devices are mostly historic artifact. You usually want the
character device; the block device is almost exclusively for mount.
It's probably a mistake to try to use both at the same time.



Mac Mini

2014-11-20 Thread Austin Gilbert
I have an amd64 based Mac Mini which I would like to run OpenBSD on. 

With OpenBSD 5.6, the USB keyboard works at the “boot” prompt, but not after 
booting BSD.rd. The Mac Mini has USB 3 ports, I thought perhaps the newly 
minted USB 3 support in current could help, but the nightly snapshot behaved 
the same as the last release version.

Is there anything I can do at the “boot” prompt to try disabling/enabling 
different device drivers for the USB ports so the keyboard will work under 
BSD.rd? 

The other option I thought of would be setting the terminal to a serial port… 
which I can’t do as I don’t have any serial ports on the box. Only Thunderbolt 
2, USB 3, Ethernet.



Re: Mac Mini

2014-11-20 Thread Otto Moerbeek
On Thu, Nov 20, 2014 at 12:37:58PM -0600, Austin Gilbert wrote:

 I have an amd64 based Mac Mini which I would like to run OpenBSD on. 
 
 With OpenBSD 5.6, the USB keyboard works at the ?boot? prompt, but not after 
 booting BSD.rd. The Mac Mini has USB 3 ports, I thought perhaps the newly 
 minted USB 3 support in current could help, but the nightly snapshot behaved 
 the same as the last release version.
 
 Is there anything I can do at the ?boot? prompt to try disabling/enabling 
 different device drivers for the USB ports so the keyboard will work under 
 BSD.rd? 
 
 The other option I thought of would be setting the terminal to a serial port? 
 which I can?t do as I don?t have any serial ports on the box. Only 
 Thunderbolt 2, USB 3, Ethernet.

There are many Mac mini models. We can tell nothing without a dmesg.
See the FAQ on how to capture it.

-Otto



Re: Mac Mini

2014-11-20 Thread Austin Gilbert
 On Nov 20, 2014, at 1:27 PM, Otto Moerbeek o...@drijf.net wrote:

 On Thu, Nov 20, 2014 at 12:37:58PM -0600, Austin Gilbert wrote:

 I have an amd64 based Mac Mini which I would like to run OpenBSD on.

 With OpenBSD 5.6, the USB keyboard works at the ?boot? prompt, but not
after booting BSD.rd. The Mac Mini has USB 3 ports, I thought perhaps the
newly minted USB 3 support in current could help, but the nightly snapshot
behaved the same as the last release version.

 Is there anything I can do at the ?boot? prompt to try disabling/enabling
different device drivers for the USB ports so the keyboard will work under
BSD.rd?

 The other option I thought of would be setting the terminal to a serial
port? which I can?t do as I don?t have any serial ports on the box. Only
Thunderbolt 2, USB 3, Ethernet.

 There are many Mac mini models. We can tell nothing without a dmesg.

I'd love to get a dmesg, just need a way for the keyboard to work under
BSD.rd.

I was really asking if there were some tricks I could use at the 'boot' to
maybe change how the USB is getting driven.

I have no PS2 port, only USB 3 for keyboard. I also have no serial ports, so
redirecting console is not an option.

 See the FAQ on how to capture it.

Do you have a specific link that covers my specific situation?

http://www.openbsd.org/faq/faq4.html#getdmesg

Mounting a writable drive requires the keyboard to work. Yeah?

I have no serial ports I can redirect the console to.

I gather I'm just dead in the water then. I assume the normal OS developer
would debug under friendlier conditions. ;(



Re: Mac Mini

2014-11-20 Thread Dmitrij D. Czarkoff
Austin Gilbert said:
 Is there anything I can do at the “boot” prompt to try
 disabling/enabling different device drivers for the USB ports so the
 keyboard will work under BSD.rd? 

Your best bet would probably be to install OpenBSD in unattended mode[1]
and get dmesg via ssh.  That said, you may try disabling controllers via
UKC(8)[2], but I am not sure whether it is available in bsd.rd.

-- 
Dmitrij D. Czarkoff

[1] http://undeadly.org/cgi?action=articlesid=20140106055302
[2] http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man8/UKC.8



Re: Mac Mini

2014-11-20 Thread Maurice McCarthy

On 2014-11-20 18:37, Austin Gilbert wrote:

I have an amd64 based Mac Mini which I would like to run OpenBSD on.

With OpenBSD 5.6, the USB keyboard works at the “boot” prompt, but
not after booting BSD.rd. The Mac Mini has USB 3 ports, I thought
perhaps the newly minted USB 3 support in current could help, but the
nightly snapshot behaved the same as the last release version.

Is there anything I can do at the “boot” prompt to try
disabling/enabling different device drivers for the USB ports so the
keyboard will work under BSD.rd?

The other option I thought of would be setting the terminal to a
serial port… which I can’t do as I don’t have any serial ports on the
box. Only Thunderbolt 2, USB 3, Ethernet.


The OpenBSD usb3 driver xhci was only released after the 5.6 disks so 
you might have to download the most 5.6-current in its most recent 
snapshot to get this to work. It will work to the bios because it has 
been manufactured that way.


Good Luck
Moss



Re: Mac Mini

2014-11-20 Thread Chris Cappuccio
Austin Gilbert [austin.gilb...@gmail.com] wrote:
  On Nov 20, 2014, at 1:27 PM, Otto Moerbeek o...@drijf.net wrote:
 
  On Thu, Nov 20, 2014 at 12:37:58PM -0600, Austin Gilbert wrote:
 
  I have an amd64 based Mac Mini which I would like to run OpenBSD on.
 
  With OpenBSD 5.6, the USB keyboard works at the ?boot? prompt, but not
 after booting BSD.rd. The Mac Mini has USB 3 ports, I thought perhaps the
 newly minted USB 3 support in current could help, but the nightly snapshot
 behaved the same as the last release version.
 
  Is there anything I can do at the ?boot? prompt to try disabling/enabling
 different device drivers for the USB ports so the keyboard will work under
 BSD.rd?
 
  The other option I thought of would be setting the terminal to a serial
 port? which I can?t do as I don?t have any serial ports on the box. Only
 Thunderbolt 2, USB 3, Ethernet.


You might want to try a -current snapshot. They have a USB 3 driver!



Re: Mac Mini

2014-11-20 Thread Peter Kay
On 20 November 2014 20:13:42 GMT+00:00, Austin Gilbert 
austin.gilb...@gmail.com wrote:

I have no serial ports I can redirect the console to.

I gather I'm just dead in the water then. I assume the normal OS
developer
would debug under friendlier conditions. ;(

I was going to suggest yaifo, but it looks like it's dead. However, OpenBSD 
does support an unattended PXE install. Use that, then ssh in and do a dmesg?

PK



ifstated intermittant flapping after 5.1 to 5.5 upgrade

2014-11-20 Thread Alan McKay
Hi folks,

After a 5.1 to 5.5 upgrade on a redundant firewall pair, every once in
a while my FW2 (backup) promotes itself and then immediately demotes
itself again.  Which I find very odd because it is doing so based on
pinging its peer every 10 seconds, and so the value of that boolean
should only change after 10 seconds, no?

I cannot find anything else going on in other log files around the
same time that would help explain this.

From my /var/log/daemon :

Nov 15 17:55:25 my-hostname ifstated[28981]: changing state to promoted
Nov 15 17:55:25 my-hostname ifstated[28981]: changing state to backup
Nov 16 21:43:07 my-hostname ifstated[28981]: changing state to promoted
Nov 16 21:43:07 my-hostname ifstated[28981]: changing state to backup
Nov 18 11:44:38 my-hostname ifstated[28981]: changing state to promoted
Nov 18 11:44:38 my-hostname ifstated[28981]: changing state to backup
Nov 19 07:44:27 my-hostname ifstated[28981]: changing state to promoted
Nov 19 07:44:27 my-hostname ifstated[28981]: changing state to backup

Ifstated.conf has changed very little since before the upgrade - a few
minor tweaks and that is it.  And what is triggering the flap is this
piece of code :

These are the internal and external interfaces.  The first IP is the
front door.  The second one is an internal IP - the stuff I am
protecting.  This is happening in 3 different environments all with
carbon-copy configs

peer = '( ping -q -c 1 -w 1 10.1.1.1  /dev/null 21 every 10  \
   ping -q -c 1 -w 1 10.20.1.1  /dev/null 21 every 10)'

snip---

if  ! $peer {
if $carp_ready {
if $local {
if $relayd {
set-state promoted
}
}
}
}


And here is the whole ifstated.conf - with some added debug statements
to try to help me get to the bottom of this.


init-state backup

carp_ready = ( (! carp0.link.unknown)  (! carp1.link.unknown)  (!
carp5.link.unknown)  (! carp20.link.unknown)  (!
carp25.link.unknown)  (! carp30.link.unknown) )

local = '( ping -q -c 1 -w 1 10.1.1.2  /dev/null 21 every 10  \
ping -q -c 1 -w 1 10.20.1.2  /dev/null 21 every 10)'

# changed this to determine which one was not pinging
# peer = '( ping -q -c 1 -w 1 10.1.1.1  /dev/null 21 every 10  \
#   ping -q -c 1 -w 1 10.20.1.1  /dev/null 21 every 10)'
peer1 = '( ping -q -c 1 -w 1 10.1.1.1  /dev/null 21 every 10)'
peer2 = '( ping -q -c 1 -w 1 10.20.1.1  /dev/null 21 every 10)'

# If relayd fails, we will not be promoted.
relayd = '( pgrep relayd | wc -l | grep 8 every 10 )'

state backup {
init {
run  echo \$(date +\%Y-%M-%d %H:%M:%S\) starting
up\  /var/log/ifstated
run ifconfig carp0 advskew 100
run ifconfig carp1 advskew 100
run ifconfig carp5 advskew 100
run ifconfig carp20 advskew 100
run ifconfig carp25 advskew 100
run ifconfig carp30 advskew 100
run sleep 60
}

# these debugging statements are new to help get to the bottom of it
if ! $peer1  {
run echo \$(date +\%Y-%M-%d %H:%M:%S\) peer1 no
good\  /var/log/ifstated
}
if ! $peer2  {
run echo \$(date +\%Y-%M-%d %H:%M:%S\) peer2 no
good\  /var/log/ifstated
}
if ! $carp_ready  {
run echo \$(date +\%Y-%M-%d %H:%M:%S\) carp_ready
no good\  /var/log/ifstated
}
if ! $local  {
run echo \$(date +\%Y-%M-%d %H:%M:%S\) local no
good\  /var/log/ifstated
}
if ! $relayd  {
run echo \$(date +\%Y-%M-%d %H:%M:%S\) relayd no
good\  /var/log/ifstated
}

if ( ! $peer1 ) || ( ! $peer2 ) {
if $carp_ready {
if $local {
if $relayd {
set-state promoted
}
}
}
}
}

state promoted {
init {
run ifconfig carp0 advskew 10
run ifconfig carp1 advskew 10
run ifconfig carp5 advskew 10
run ifconfig carp20 advskew 10
run ifconfig carp25 advskew 10
run ifconfig carp30 advskew 10
}

if ( $peer1 )  ( $peer2 ) {
set-state backup
}

}


-- 
Don't eat anything you've ever seen advertised on TV
 - Michael Pollan, author of In Defense of Food



Re: ifstated intermittant flapping after 5.1 to 5.5 upgrade

2014-11-20 Thread Alan McKay
On Thu, Nov 20, 2014 at 3:57 PM, Alan McKay alan.mc...@gmail.com wrote:
 peer1 = '( ping -q -c 1 -w 1 10.1.1.1  /dev/null 21 every 10)'
 peer2 = '( ping -q -c 1 -w 1 10.20.1.1  /dev/null 21 every 10)'

At present I am thinking that my problem would go away if I changed my
pings to -c 3 -w 3 instead of 1s, but it was never a problem before
the upgrade so I'm a big baffled.

I would hate to fix that and thereby mask some other issue.

-- 
Don't eat anything you've ever seen advertised on TV
 - Michael Pollan, author of In Defense of Food



using cua0 the easy way

2014-11-20 Thread sven falempin
How an openBSD dev is reading the /dev/cua when the cua is a ksh shall
on the other side ?
stty is obscure to me,

I may install minicom or screen but how do you do that ?

-- 
-
() ascii ribbon campaign - against html e-mail
/\



Re: Mac Mini

2014-11-20 Thread Austin Gilbert
On Nov 20, 2014, at 2:33 PM, Chris Cappuccio ch...@nmedia.net wrote:

 Austin Gilbert [austin.gilb...@gmail.com] wrote:
 On Nov 20, 2014, at 1:27 PM, Otto Moerbeek o...@drijf.net wrote:
 
 On Thu, Nov 20, 2014 at 12:37:58PM -0600, Austin Gilbert wrote:
 
 I have an amd64 based Mac Mini which I would like to run OpenBSD on.
 
 With OpenBSD 5.6, the USB keyboard works at the ?boot? prompt, but not
 after booting BSD.rd. The Mac Mini has USB 3 ports, I thought perhaps the
 newly minted USB 3 support in current could help, but the nightly snapshot
 behaved the same as the last release version.
 
 Is there anything I can do at the ?boot? prompt to try disabling/enabling
 different device drivers for the USB ports so the keyboard will work under
 BSD.rd?
 
 The other option I thought of would be setting the terminal to a serial
 port? which I can?t do as I don?t have any serial ports on the box. Only
 Thunderbolt 2, USB 3, Ethernet.
 
 
 You might want to try a -current snapshot. They have a USB 3 driver!

I saw the news about the USB 3 driver in current and was very excited about 
that. The first thing I did was grab a snapshot. Sadly, the snapshot BSD.rd 
behaves the same as the stable 5.6 release (as of the 16th).



Re: using cua0 the easy way

2014-11-20 Thread Fred

On 11/20/14 21:47, sven falempin wrote:

How an openBSD dev is reading the /dev/cua when the cua is a ksh shall
on the other side ?
stty is obscure to me,

I may install minicom or screen but how do you do that ?



cu(1)?



Re: Mac Mini

2014-11-20 Thread bodie

On 20.11.2014 22:49, Austin Gilbert wrote:
On Nov 20, 2014, at 2:33 PM, Chris Cappuccio ch...@nmedia.net 
wrote:



Austin Gilbert [austin.gilb...@gmail.com] wrote:

On Nov 20, 2014, at 1:27 PM, Otto Moerbeek o...@drijf.net wrote:


On Thu, Nov 20, 2014 at 12:37:58PM -0600, Austin Gilbert wrote:

I have an amd64 based Mac Mini which I would like to run OpenBSD 
on.


With OpenBSD 5.6, the USB keyboard works at the ?boot? prompt, 
but not
after booting BSD.rd. The Mac Mini has USB 3 ports, I thought 
perhaps the
newly minted USB 3 support in current could help, but the nightly 
snapshot

behaved the same as the last release version.


Is there anything I can do at the ?boot? prompt to try 
disabling/enabling
different device drivers for the USB ports so the keyboard will 
work under

BSD.rd?


The other option I thought of would be setting the terminal to a 
serial
port? which I can?t do as I don?t have any serial ports on the box. 
Only

Thunderbolt 2, USB 3, Ethernet.



You might want to try a -current snapshot. They have a USB 3 driver!


I saw the news about the USB 3 driver in current and was very excited
about that. The first thing I did was grab a snapshot. Sadly, the
snapshot BSD.rd behaves the same as the stable 5.6 release (as of the
16th).


What is the date of your bsd.rd and snapshot? They are new most of the 
time daily.

Like eg. now 20-Nov-2014 21:40  7.2M

Did you already try to install complete snapshot on USB flash disk and 
boot out of it

to see if it's issue just with bsd.rd or even with regular kernel?



Re: using cua0 the easy way

2014-11-20 Thread sven falempin
On Thu, Nov 20, 2014 at 5:02 PM, Fred open...@crowsons.com wrote:
 On 11/20/14 21:47, sven falempin wrote:

 How an openBSD dev is reading the /dev/cua when the cua is a ksh shall
 on the other side ?
 stty is obscure to me,

 I may install minicom or screen but how do you do that ?


 cu(1)?


 I didn't find it wihout you

Index: tty.4
===
RCS file: /cvs/src/share/man/man4/tty.4,v
retrieving revision 1.40
diff -u -p -r1.40 tty.4
--- tty.4 21 Jan 2014 03:15:46 - 1.40
+++ tty.4 20 Nov 2014 22:14:35 -
@@ -492,6 +492,7 @@ controlling terminal, if any
.Sh SEE ALSO
.Xr stty 1 ,
.Xr tty 1 ,
+.Xr cu 1 ,
.Xr ioctl 2 ,
.Xr pty 4 ,
.Xr termios 4 ,

-- 
-
() ascii ribbon campaign - against html e-mail
/\



Re: Mac Mini

2014-11-20 Thread Chris Cappuccio
Austin Gilbert [austin.gilb...@gmail.com] wrote:
 
 I saw the news about the USB 3 driver in current and was very excited about 
 that. The first thing I did was grab a snapshot. Sadly, the snapshot BSD.rd 
 behaves the same as the stable 5.6 release (as of the 16th).

xhci is commented out on the ramdisk, although I'm not sure why that is the case

(It certainly should be on the RAMDISK_CD version!)



Re: Mac Mini

2014-11-20 Thread Austin Gilbert
On Nov 20, 2014, at 4:08 PM, bodie bodz...@openbsd.cz wrote:

 
 What is the date of your bsd.rd and snapshot? They are new most of the time 
 daily.
 Like eg. now 20-Nov-2014 21:407.2M

Perhaps I got burned by cheating? I grabbed install56.iso burned it to a CD and 
booted that. I didn’t verify the bsd.rd on the ISO is the latest version in the 
snapshot folder. 

217M Nov 18 17:37 install56.iso

 
 Did you already try to install complete snapshot on USB flash disk and boot 
 out of it
 to see if it's issue just with bsd.rd or even with regular kernel?

Negative. When I tried installing onto the USB from my MacBook laptop (the only 
other amd64 hardware I have available) the USB wasn’t recognized. I did that 
with the 5.6 release CD not  snapshot/current, no surprise the USB 3 hardware 
wasn’t supported. 

I think at this point, I will try to go with the unattended install + SSH and 
see if I can get her up and running that way. Then I can send a dmesg and 
debugging information along to any interested parties. 



Re: Mac Mini

2014-11-20 Thread Martin Pieuchot
On 20/11/14(Thu) 15:49, Austin Gilbert wrote:
 On Nov 20, 2014, at 2:33 PM, Chris Cappuccio ch...@nmedia.net wrote:
 
  Austin Gilbert [austin.gilb...@gmail.com] wrote:
  On Nov 20, 2014, at 1:27 PM, Otto Moerbeek o...@drijf.net wrote:
  
  On Thu, Nov 20, 2014 at 12:37:58PM -0600, Austin Gilbert wrote:
  
  I have an amd64 based Mac Mini which I would like to run OpenBSD on.
  
  With OpenBSD 5.6, the USB keyboard works at the ?boot? prompt, but not
  after booting BSD.rd. The Mac Mini has USB 3 ports, I thought perhaps the
  newly minted USB 3 support in current could help, but the nightly snapshot
  behaved the same as the last release version.
  
  Is there anything I can do at the ?boot? prompt to try 
  disabling/enabling
  different device drivers for the USB ports so the keyboard will work under
  BSD.rd?
  
  The other option I thought of would be setting the terminal to a serial
  port? which I can?t do as I don?t have any serial ports on the box. Only
  Thunderbolt 2, USB 3, Ethernet.
  
  
  You might want to try a -current snapshot. They have a USB 3 driver!
 
 I saw the news about the USB 3 driver in current and was very excited about 
 that. The first thing I did was grab a snapshot. Sadly, the snapshot BSD.rd 
 behaves the same as the stable 5.6 release (as of the 16th).

bsd.rd do not include xhci(4) for the moment, because there's a known
issue with the driver  some chips.



Re: apcupsd via USB on 5.6

2014-11-20 Thread trondd
When you sent this, I had a new UPS in the mail on its way to me that I
specifically bought to be compatible with OBSD.

I, too, have the same issue.

Tim.

On Thu, Nov 20, 2014 at 11:03 AM, Steven Surdock 
ssurd...@engineered-net.com wrote:

 I just upgrade from 5.5 to 5.6 on i386 and apcupsd won't recognize my UPS
 plugged into a USB port.  On 5.5 the UPS was attached to ugen0 but on 5.6
 it say uhidev0.  Apcupsd mentions that the uhidev0 device type won't work.
 I see that I can get some info from sensord (which is cool).  Any
 suggestions for getting the UPS working with apcupds?

 Oct 22 16:16:42 builder02 /bsd: ugen0 at uhub1 port 1 American Power
 Conversion Smart-UPS 1500 FW:601.3.D USB FW:1.3 rev 1.10/0.06 addr 2

 Nov 20 08:54:27 builder02 /bsd: uhidev0 at uhub1 port 1 configuration 1
 interface 0 American Power Conversion Smart-UPS 1500 FW:601.3.D USB
 FW:1.3 rev 1.10/0.06 addr 2

 -Steve S.



No address associated with PKG_PATH mirror

2014-11-20 Thread John Smith
Hello, I get the following error when using any of the pkg_* commands:$
echo $PKG_PATH
http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/ $ pkg_info -Q
mosh 
Error from http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/
ftp: ftp.nluug.nl: no address associated with 
namehttp://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/
is empty This seems to occur with any mirror I choose.  I am able to
access the directory via a web browser.  Examining the logs in real-time
with tcpdump doesn't reveal any blocks.  Also, there are no errors
written to /var/log/messages.  Any ideas? Thanks



Re: No address associated with PKG_PATH mirror

2014-11-20 Thread John Smith
 
 

Sent: Thursday, November 20, 2014 at 8:06 PM
From: John Smith hufflep...@bsdmail.com
To: misc@openbsd.org
Subject: No address associated with PKG_PATH mirror
Hello, I get the following error when using any of the pkg_* commands:$
echo $PKG_PATH
http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/ $ pkg_info -Q
mosh
Error from 
http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]
ftp: ftp.nluug.nl: no address associated with 
namehttp://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/
is empty This seems to occur with any mirror I choose. I am able to
access the directory via a web browser. Examining the logs in real-time
with tcpdump doesn't reveal any blocks. Also, there are no errors
written to /var/log/messages. Any ideas? Thanks
 

(I apologize for the formatting. Here is the same message in plain text:)

I get the following error when using any of the pkg_* commands:

$ echo $PKG_PATH
http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/ 

$ pkg_info -Q mosh
Error from http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/
[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]
ftp: ftp.nluug.nl: no address associated with name
http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/ is empty 

This seems to occur with any mirror I choose. I am able to
access the directory via a web browser. Examining the logs in real-time
with tcpdump doesn't reveal any blocks. Also, there are no errors
written to /var/log/messages. Any ideas? 

Thanks



Re: No address associated with PKG_PATH mirror

2014-11-20 Thread John Smith
I am able to access the mirror via a web browser, however there may be 
something wrong with my dns:

# drill @127.0.0.1 http://ftp.nluug.nl
;; -HEADER- opcode: QUERY, rcode: NXDOMAIN, id: 55283
;; flags: qr rd ra ; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;; http://ftp.nluug.nl[http://ftp.nluug.nl]. IN A

;; ANSWER SECTION:

;; AUTHORITY SECTION:
nluug.nl. 3488 IN SOA ns1.nluug.nl. hostmaster.nluug.nl. 2013111701 28800 7200 
604800 3600

;; ADDITIONAL SECTION:

;; Query time: 0 msec
;; SERVER: 127.0.0.1
;; WHEN: Thu Nov 20 20:49:40 2014
;; MSG SIZE rcvd: 88


Sent: Thursday, November 20, 2014 at 8:00 PM
From: Cosmo Wu co...@tetrachina.com
To: John Smith hufflep...@bsdmail.com
Subject: Re: No address associated with PKG_PATH mirror
Hi ,

Is there anything wrong with the DNS or network connection on your OpenBSD box? 
I could access that using the mirror.


On 21.11.2014 10:06, John Smith wrote:
 Hello, I get the following error when using any of the pkg_* commands:$
 echo $PKG_PATH
 http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]
  $ pkg_info -Q
 mosh
 Error from 
 http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/][http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]]
 ftp: ftp.nluug.nl: no address associated with
 namehttp://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/
 is empty This seems to occur with any mirror I choose. I am able to
 access the directory via a web browser. Examining the logs in real-time
 with tcpdump doesn't reveal any blocks. Also, there are no errors
 written to /var/log/messages. Any ideas? Thanks

--


Best Regards,

Cosmo Wu



Re: No address associated with PKG_PATH mirror

2014-11-20 Thread Adriaan
Works for me :)

root@rel56[~] echo $PKG_PATH
http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/

root@rel56[~] pkg_info -Q mosh
mosh-1.2.4p1

root@rel56[~] dig ftp.nluug.nl

;  DiG 9.4.2-P2  ftp.nluug.nl
;; global options:  printcmd
;; Got answer:
;; -HEADER- opcode: QUERY, status: NOERROR, id: 26971
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ftp.nluug.nl.  IN  A

;; ANSWER SECTION:
ftp.nluug.nl.   63662   IN  A   192.87.102.43
ftp.nluug.nl.   63662   IN  A   192.87.102.42

;; Query time: 2 msec
;; SERVER: 192.168.222.10#53(192.168.222.10)
;; WHEN: Fri Nov 21 04:01:08 2014
;; MSG SIZE  rcvd: 62



On Fri, Nov 21, 2014 at 3:13 AM, John Smith hufflep...@bsdmail.com wrote:




 Sent: Thursday, November 20, 2014 at 8:06 PM
 From: John Smith hufflep...@bsdmail.com
 To: misc@openbsd.org
 Subject: No address associated with PKG_PATH mirror
 Hello, I get the following error when using any of the pkg_* commands:$
 echo $PKG_PATH
 http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/ $ pkg_info -Q
 mosh
 Error from
 http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]
 ftp: ftp.nluug.nl: no address associated with namehttp://
 ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/
 is empty This seems to occur with any mirror I choose. I am able to
 access the directory via a web browser. Examining the logs in real-time
 with tcpdump doesn't reveal any blocks. Also, there are no errors
 written to /var/log/messages. Any ideas? Thanks


 (I apologize for the formatting. Here is the same message in plain text:)

 I get the following error when using any of the pkg_* commands:

 $ echo $PKG_PATH
 http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/

 $ pkg_info -Q mosh
 Error from http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/
 [http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]
 ftp: ftp.nluug.nl: no address associated with name
 http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/ is empty

 This seems to occur with any mirror I choose. I am able to
 access the directory via a web browser. Examining the logs in real-time
 with tcpdump doesn't reveal any blocks. Also, there are no errors
 written to /var/log/messages. Any ideas?

 Thanks



Re: apcupsd via USB on 5.6

2014-11-20 Thread Stan Gammons

On 11/20/14 19:24, trondd wrote:

When you sent this, I had a new UPS in the mail on its way to me that I
specifically bought to be compatible with OBSD.

I, too, have the same issue.

Tim.

On Thu, Nov 20, 2014 at 11:03 AM, Steven Surdock 
ssurd...@engineered-net.com wrote:


I just upgrade from 5.5 to 5.6 on i386 and apcupsd won't recognize my UPS
plugged into a USB port.  On 5.5 the UPS was attached to ugen0 but on 5.6
it say uhidev0.  Apcupsd mentions that the uhidev0 device type won't work.
I see that I can get some info from sensord (which is cool).  Any
suggestions for getting the UPS working with apcupds?

Oct 22 16:16:42 builder02 /bsd: ugen0 at uhub1 port 1 American Power
Conversion Smart-UPS 1500 FW:601.3.D USB FW:1.3 rev 1.10/0.06 addr 2

Nov 20 08:54:27 builder02 /bsd: uhidev0 at uhub1 port 1 configuration 1
interface 0 American Power Conversion Smart-UPS 1500 FW:601.3.D USB
FW:1.3 rev 1.10/0.06 addr 2

-Steve S.


This could be the same as the problem I had with an APC usb ups using 
NUT on OpenBSD 5.6


I had to add this to usb_quirks.c and recompile the kernel in order to 
get the ups to communicate again.  I wish things were left the way they 
were in 5.5  so I don't have to do this.


+ { USB_VENDOR_APC, USB_PRODUCT_APC_UPS,ANY,{ 
UQ_BAD_HID }},
+ { USB_VENDOR_APC, USB_PRODUCT_APC_UPS5G,  ANY,{ UQ_BAD_HID }},



Stan



[SOLVED] Re: No address associated with PKG_PATH mirror

2014-11-20 Thread John Smith
Well, I'm not sure what happened but all is well now...

# drill @127.0.0.1 ftp.nluug.nl   
;; -HEADER- opcode: QUERY, rcode: NOERROR, id: 9907
;; flags: qr rd ra ; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 3 
;; QUESTION SECTION:
;; ftp.nluug.nl.IN  A

;; ANSWER SECTION:
ftp.nluug.nl.   76422   IN  A   192.87.102.42
ftp.nluug.nl.   76422   IN  A   192.87.102.43

;; AUTHORITY SECTION:
nluug.nl.   5610IN  NS  ns2.nluug.nl.
nluug.nl.   5610IN  NS  ns1.nluug.nl.

;; ADDITIONAL SECTION:
ns1.nluug.nl.   5610IN  A   46.19.34.198
ns1.nluug.nl.   76422   IN  2a02:2770::21a:4aff:fe01:dd51
ns2.nluug.nl.   5610IN  A   193.200.132.194

;; Query time: 135 msec
;; SERVER: 127.0.0.1
;; WHEN: Thu Nov 20 21:14:18 2014
;; MSG SIZE  rcvd: 158
# pkg_info -Q mosh
mosh-1.2.4p1 (installed)

Thanks for the help
 

Sent: Thursday, November 20, 2014 at 9:04 PM
From: Adriaan misc.adri...@gmail.com
To: OpenBSD general usage list misc@openbsd.org
Subject: Re: No address associated with PKG_PATH mirror
Works for me :)

root@rel56[~] echo $PKG_PATH
http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/

root@rel56[~] pkg_info -Q mosh
mosh-1.2.4p1

root@rel56[~] dig ftp.nluug.nl

;  DiG 9.4.2-P2  ftp.nluug.nl
;; global options: printcmd
;; Got answer:
;; -HEADER- opcode: QUERY, status: NOERROR, id: 26971
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ftp.nluug.nl. IN A

;; ANSWER SECTION:
ftp.nluug.nl. 63662 IN A 192.87.102.43
ftp.nluug.nl. 63662 IN A 192.87.102.42

;; Query time: 2 msec
;; SERVER: 192.168.222.10#53(192.168.222.10)
;; WHEN: Fri Nov 21 04:01:08 2014
;; MSG SIZE rcvd: 62



On Fri, Nov 21, 2014 at 3:13 AM, John Smith hufflep...@bsdmail.com wrote:




 Sent: Thursday, November 20, 2014 at 8:06 PM
 From: John Smith hufflep...@bsdmail.com
 To: misc@openbsd.org
 Subject: No address associated with PKG_PATH mirror
 Hello, I get the following error when using any of the pkg_* commands:$
 echo $PKG_PATH
 http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]
  $ pkg_info -Q
 mosh
 Error from
 http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/][http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]]
 ftp: ftp.nluug.nl: no address associated with namehttp://
 ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/
 is empty This seems to occur with any mirror I choose. I am able to
 access the directory via a web browser. Examining the logs in real-time
 with tcpdump doesn't reveal any blocks. Also, there are no errors
 written to /var/log/messages. Any ideas? Thanks


 (I apologize for the formatting. Here is the same message in plain text:)

 I get the following error when using any of the pkg_* commands:

 $ echo $PKG_PATH
 http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]

 $ pkg_info -Q mosh
 Error from 
 http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]
 [http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]]
 ftp: ftp.nluug.nl: no address associated with name
 http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/[http://ftp.nluug.nl/pub/OpenBSD/5.6/packages/amd64/]
  is empty

 This seems to occur with any mirror I choose. I am able to
 access the directory via a web browser. Examining the logs in real-time
 with tcpdump doesn't reveal any blocks. Also, there are no errors
 written to /var/log/messages. Any ideas?

 Thanks
 



Re: apcupsd via USB on 5.6

2014-11-20 Thread David Higgs
On Thu, Nov 20, 2014 at 11:03 AM, Steven Surdock
ssurd...@engineered-net.com wrote:
 I just upgrade from 5.5 to 5.6 on i386 and apcupsd won't recognize my UPS 
 plugged into a USB port.  On 5.5 the UPS was attached to ugen0 but on 5.6 it 
 say uhidev0.  Apcupsd mentions that the uhidev0 device type won't work.  I 
 see that I can get some info from sensord (which is cool).  Any suggestions 
 for getting the UPS working with apcupds?

 Oct 22 16:16:42 builder02 /bsd: ugen0 at uhub1 port 1 American Power 
 Conversion Smart-UPS 1500 FW:601.3.D USB FW:1.3 rev 1.10/0.06 addr 2

 Nov 20 08:54:27 builder02 /bsd: uhidev0 at uhub1 port 1 configuration 1 
 interface 0 American Power Conversion Smart-UPS 1500 FW:601.3.D USB FW:1.3 
 rev 1.10/0.06 addr 2


Depending on what you configured apcupsd to do and what sysctl
exposes, you may be able to create equivalent behavior using
sensorsd(8).  There's a brief overview in the comments of the undeadly
article below, to serve as starting point for your needs:

http://undeadly.org/cgi?action=articlesid=20140320093943

--david



Re: apcupsd via USB on 5.6

2014-11-20 Thread trondd
 Depending on what you configured apcupsd to do and what sysctl
 exposes, you may be able to create equivalent behavior using
 sensorsd(8).  There's a brief overview in the comments of the undeadly
 article below, to serve as starting point for your needs:

 http://undeadly.org/cgi?action=articlesid=20140320093943

 --david

Yup. That was the solution.

Tim.



Fixes for newsyslog(8) time parsing

2014-11-20 Thread David Higgs
The tm_mon already adjusts by 1, so the allowed range should be 0 -
11.  Since mktime(3) is permissive in what it accepts, I think this
check is correct.

The second part handles the (theoretically valid but essentially
useless) parsing of a configuration file with an ISO 8601 date with
leap second.  I'm not sure whether mktime(3) discards or keeps valid
leap seconds, or if the restrictedness of the implementation should
permit them, so maybe this isn't necessary.

Apologies since gmail will probably mangle the diff.

--david

--- usr.bin/newsyslog/newsyslog.c Thu Nov 20 15:11:02 2014
+++ usr.bin/newsyslog/newsyslog.c Thu Nov 20 15:12:39 2014
@@ -1186,7 +1186,7 @@ parse8601(char *s)
  }

  /* sanity check */
- if (tm.tm_year  70 || tm.tm_mon  0 || tm.tm_mon  12 ||
+ if (tm.tm_year  70 || tm.tm_mon  0 || tm.tm_mon  11 ||
 tm.tm_mday  1 || tm.tm_mday  31)
  return (-1);

@@ -1213,7 +1213,7 @@ parse8601(char *s)
  }

  /* sanity check */
- if (tm.tm_sec  0 || tm.tm_sec  60 || tm.tm_min  0 ||
+ if (tm.tm_sec  0 || tm.tm_sec  61 || tm.tm_min  0 ||
 tm.tm_min  59 || tm.tm_hour  0 || tm.tm_hour  23)
  return (-1);
  }



Re: Mac Mini

2014-11-20 Thread bodie

On 20.11.2014 23:40, Austin Gilbert wrote:

On Nov 20, 2014, at 4:08 PM, bodie bodz...@openbsd.cz wrote:



What is the date of your bsd.rd and snapshot? They are new most of 
the time daily.

Like eg. now 20-Nov-2014 21:40  7.2M


Perhaps I got burned by cheating? I grabbed install56.iso burned it
to a CD and booted that. I didn’t verify the bsd.rd on the ISO is
the latest version in the snapshot folder.

217M Nov 18 17:37 install56.iso



Did you already try to install complete snapshot on USB flash disk 
and boot out of it

to see if it's issue just with bsd.rd or even with regular kernel?


Negative. When I tried installing onto the USB from my MacBook laptop
(the only other amd64 hardware I have available) the USB wasn’t
recognized. I did that with the 5.6 release CD not  snapshot/current,
no surprise the USB 3 hardware wasn’t supported.


You can do this point anywhere where you have ability to provide USB 
flash to
eg. virtual machine in VirtualBox, VMware Player, Qemu, whatever. It's 
sometimes handy

to have such flash disk at hand.



I think at this point, I will try to go with the unattended install +
SSH and see if I can get her up and running that way. Then I can send
a dmesg and debugging information along to any interested parties.




*ERROR* radeon_cp: Failed to load firmware radeon-r300_cp

2014-11-20 Thread John Smith
$ dmesg 

drm: initializing kernel modesetting (RS480 0x1002:0x5954 0x103C:0x2A26).
radeondrm0: VRAM: 64M 0x1C00 - 0x1FFF (64M used)
radeondrm0: GTT: 512M 0x2000 - 0x3FFF
drm: PCIE GART of 512M enabled (table at 0x02BA5000).
error: [drm:pid0:r100_cp_init_microcode] *ERROR* radeon_cp: Failed to load 
firmware radeon-r300_cp
error: [drm:pid0:r100_cp_init] *ERROR* Failed to load firmware!
error: [drm:pid0:rs400_startup] *ERROR* failed initializing CP (-2).
error: [drm:pid0:rs400_init] *ERROR* Disabling GPU acceleration
drm: radeon: cp finalized

Is there anyway I can prevent this seemingly harmless error? I don't use X and 
didn't select the X packages during the installation process.



sole instance of a process

2014-11-20 Thread Pete Vickers
Hi,

I suspect this may be the wrong list for this question. However although 
strictly it's a Bourne shell script query, it only seem to act up under OpenBSD 
(for me).

Essentially I have a job which needs to be run periodically. So I have a shell 
script to do the necessary commands, and this is scheduled via (root's) crontab.
It is however very important that multiple instances of the job are not run 
concurrently (e.g. if an previous invocation hung), and so the script should 
detect this upon invocation before proceeding.

I don't want a single long running job (which could e.g. sleep between loops) 
for various reasons. And I also don't like PID files and other fragile locking 
hacks.


So down to business, below is the gist of my script. Most of the time it 
appears to run fine. However occasionally (once every couple of days?) it 
reports via email that a duplicate process is detected, but the included ps 
listing shows no other instance. I don't believe that this is just due to an 
old instance exiting in the small time window between the pgrep, and the ps 
invocations.  So basically I guess there is an error in my script or it's 
logic, or something else I'm not seeing.

Any hit with the clue bat gratefully received.



#!/bin/sh
#
#
SHOUT=/usr/bin/logger -i -t MYPERIODICJOB
#
#
# Ensure another instance of this is not running
#
MYNAME=`basename $0`
MYPID=$$
#
/usr/bin/pgrep -fu root $MYNAME | /usr/bin/grep -v $MYPID  \
{
$SHOUT HELP - duplicate process detected $? ; \
ps -axjwww | mail -s HELP MYPERIODICJOB $MYPID $MYNAME $PPID 
m...@example.com ; \
exit 1 ;
 }

#
#
# starting doing useful stuff here..
#


Disclaimer: I know my scripting is far from optimal...


/Pete



Re: sole instance of a process

2014-11-20 Thread Vadim Zhukov
21 нояб. 2014 г. 10:00 пользователь Pete Vickers
peter.vick...@gmail.com
написал:

 Hi,

 I suspect this may be the wrong list for this question. However although
strictly it's a Bourne shell script query, it only seem to act up under
OpenBSD (for me).

 Essentially I have a job which needs to be run periodically. So I have a
shell script to do the necessary commands, and this is scheduled via
(root's) crontab.
 It is however very important that multiple instances of the job are not
run concurrently (e.g. if an previous invocation hung), and so the script
should detect this upon invocation before proceeding.

 I don't want a single long running job (which could e.g. sleep between
loops) for various reasons. And I also don't like PID files and other
fragile locking hacks.


 So down to business, below is the gist of my script. Most of the time it
appears to run fine. However occasionally (once every couple of days?) it
reports via email that a duplicate process is detected, but the included ps
listing shows no other instance. I don't believe that this is just due to
an old instance exiting in the small time window between the pgrep, and the
ps invocations.  So basically I guess there is an error in my script or
it's logic, or something else I'm not seeing.

 Any hit with the clue bat gratefully received.



 #!/bin/sh
 #
 #
 SHOUT=/usr/bin/logger -i -t MYPERIODICJOB
 #
 #
 # Ensure another instance of this is not running
 #
 MYNAME=`basename $0`
 MYPID=$$
 #
 /usr/bin/pgrep -fu root $MYNAME | /usr/bin/grep -v $MYPID  \

First problem: if first shell running script has PID 75 and second has PID
5, this grep command will ignore both.

Second problem: if you have anything in system with argument containing
script's name, like text editor, or file scanner, or whatever, it will
match, too, producing the problem you see.

I'd recommend you to save output of ps in a temporary variable, and run
grep on its content.

But the better solution should be locking of some sort. You can use
dolock(1) from ports infrastructure (don't forget to remove lock file in
EXIT trap), or just switch to Perl and proper file locks.

 {
 $SHOUT HELP - duplicate process detected $? ; \
 ps -axjwww | mail -s HELP MYPERIODICJOB $MYPID $MYNAME
$PPID m...@example.com ; \
 exit 1 ;
  }

 #
 #
 # starting doing useful stuff here..
 #


 Disclaimer: I know my scripting is far from optimal...

--
Vadim Zhukov



Re: sole instance of a process

2014-11-20 Thread Alexander Hall
On November 21, 2014 7:57:22 AM CET, Pete Vickers peter.vick...@gmail.com 
wrote:
Hi,

I suspect this may be the wrong list for this question. However
although strictly it's a Bourne shell script query, it only seem to act
up under OpenBSD (for me).

Essentially I have a job which needs to be run periodically. So I have
a shell script to do the necessary commands, and this is scheduled via
(root's) crontab.
It is however very important that multiple instances of the job are not
run concurrently (e.g. if an previous invocation hung), and so the
script should detect this upon invocation before proceeding.

I don't want a single long running job (which could e.g. sleep between
loops) for various reasons. And I also don't like PID files and other
fragile locking hacks.


So down to business, below is the gist of my script. Most of the time
it appears to run fine. However occasionally (once every couple of
days?) it reports via email that a duplicate process is detected, but
the included ps listing shows no other instance. I don't believe that
this is just due to an old instance exiting in the small time window
between the pgrep, and the ps invocations.  So basically I guess there
is an error in my script or it's logic, or something else I'm not
seeing.

Any hit with the clue bat gratefully received.



#!/bin/sh
#
#
SHOUT=/usr/bin/logger -i -t MYPERIODICJOB
#
#
# Ensure another instance of this is not running
#
MYNAME=`basename $0`
MYPID=$$
#
/usr/bin/pgrep -fu root $MYNAME | /usr/bin/grep -v $MYPID  \
{
$SHOUT HELP - duplicate process detected $? ; \
ps -axjwww | mail -s HELP MYPERIODICJOB $MYPID $MYNAME $PPID
m...@example.com ; \
exit 1 ;
 }

#
#
# starting doing useful stuff here..
#


Disclaimer: I know my scripting is far from optimal...


/Pete

# pkg_add flock

Far less hackish than what you're trying to achieve.

/Alexander