This patch fixes two issues with the current ports/net/openafs
1. It fies the one reported bellow by Bruno, and
2. It handles secure level 2 properly.

-Ober

Richard Chesler: [Reading a piece of paper] The first rule of Fight Club is you don't talk about Fight Club? Narrator: [Voice-over] I'm half asleep again; I must've left the original in the copy machine.
Richard Chesler: The second rule of Fight Club - is this yours?
Narrator: Huh?
Richard Chesler: Pretend you're me, make a managerial decision: you find this, what would you do?

---------- Forwarded message ----------
Date: Wed, 08 Feb 2006 17:32:15 -0500
From: Bruno Bigras <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: OpenAFS

Hi,

When I reboot after the first time I ran openafs-setup, it keep telling me:

#######################################
You are running at a secure level that does not allow for loading
kernel modules. An update has been made to /etc/rc.securelevel in
order to load OpenAFS on the next reboot.
Please reboot for this to take effect.
Then just rerun this script to continue the setup.
#######################################

I think it's because "&& `modstat|grep afs`" was removed from the following comparaison.

-if [[ `sysctl kern.securelevel|awk -F"=" '{print $2}'` == 1 && `modstat|grep afs` == "" ]]
+if [[ `sysctl kern.securelevel|awk -F"=" '{print $2}'` == 1 ]]

thanks for the port

-
Bruno



OpenBSD 3.9-beta (GENERIC) #595: Mon Jan 30 12:13:55 MST 2006
    [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel Celeron ("GenuineIntel" 686-class, 256KB L2 cache) 333 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR
real mem  = 133767168 (130632K)
avail mem = 115335168 (112632K)
using 1658 buffers containing 6791168 bytes (6632K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(ff) BIOS, date 11/30/99, BIOS32 rev. 0 @ 0xf0000
apm0 at bios0: Power Management spec V1.2 (BIOS managing devices)
apm0: battery life expectancy 100%
apm0: AC on, battery charge high
apm0: flags 130102 dobusy 0 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xf0000/0x1080
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf09a0/96 (4 entries)
pcibios0: bad IRQ table checksum
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xf6cc0/96 (4 entries)
pcibios0: PCI Exclusive IRQs: 11
pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371AB PIIX4 ISA" rev 0x00)
pcibios0: PCI bus #3 is the last bus
bios0: ROM list: 0xc0000/0x10000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x03
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Mach64 LB" rev 0xdc
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02
pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <IBM-DBCA-206480>
wd0: 16-sector PIO, LBA, 6194MB, 12685680 sectors
atapiscsi0 at pciide0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <TOSHIBA, CD-ROM XM-1902B, 1218> SCSI0 5/cdrom removable
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
cd0(pciide0:0:1): using PIO mode 4, DMA mode 2
pciide0: channel 1 ignored (disabled)
uhci0 at pci0 dev 7 function 2 "Intel 82371AB USB" rev 0x01: irq 11
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
piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x02: SMBus disabled
cbb0 at pci0 dev 17 function 0 "Texas Instruments PCI1225 CardBus" rev 0x01: irq 11 cbb1 at pci0 dev 17 function 1 "Texas Instruments PCI1225 CardBus" rev 0x01: irq 11
isa0 at pcib0
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
sb0 at isa0 port 0x220/24 irq 5 drq 1: dsp v3.01
midi0 at sb0: <SB MIDI UART>
audio0 at sb0
opl0 at sb0: model OPL3
midi1 at opl0: <SB Yamaha OPL3>
pcppi0 at isa0 port 0x61
midi2 at pcppi0: <PC speaker>
spkr0 at pcppi0
sysbeep0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom2: irq 5 already in use
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 2 device 0 cacheline 0x8, lattimer 0x20
pcmcia0 at cardslot0
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 3 device 0 cacheline 0x8, lattimer 0x20
pcmcia1 at cardslot1
biomask ef4d netmask ef4d ttymask ffcf
pctr: 686-class user-level performance counters enabled
mtrr: Pentium Pro MTRR support
dc0 at cardbus0 dev 0 function 0 "Xircom, CardBus Ethernet II 10/100, CBEII-10/100" irq 11 address 00:10:a4:fc:31:ec
tqphy0 at dc0 phy 0: 78Q2120 10/100 PHY, rev. 10
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
--- ports/net/openafs/files/openafs-setup.orig  Wed Feb  8 22:00:45 2006
+++ ports/net/openafs/files/openafs-setup       Thu Feb  9 16:43:40 2006
@@ -86,23 +86,31 @@
 EOF
 fi
 
-if [[ `sysctl kern.securelevel|awk -F"=" '{print $2}'` == 1 ]]
+if [[ `sysctl kern.securelevel|awk -F"=" '{print $2}'` -ge 1 ]]
 then
+
+        if [[ `modstat|grep afs` == "" ]]
+        then
+
 cat <<EOF
-       #######################################
-       You are running at a secure level that does not allow for loading 
-       kernel modules. An update has been made to /etc/rc.securelevel in
-       order to load OpenAFS on the next reboot.
-       Please reboot for this to take effect.
-       Then just rerun this script to continue the setup.
-       #######################################
+        #######################################
+        You are running at a secure level that does not allow for loading
+        kernel modules. An update has been made to /etc/rc.securelevel in
+        order to load OpenAFS on the next reboot.
+        Please reboot for this to take effect.
+        Then just rerun this script to continue the setup.
+        #######################################
 EOF
-       exit
-else
-       if [[ `modstat|grep afs` == "" ]]
-       then
-               /sbin/modload %LOCALBASE%/lib/openafs/libafs.o
-       fi
+exit
+
+        fi
+
+else # not running in secure level >= 1
+
+        if [[ `modstat|grep afs` == "" ]]
+        then
+                /sbin/modload %LOCALBASE%/lib/openafs/libafs.o
+        fi
 fi
 
 # Test if arla is mounted. If so unmount

Reply via email to