Re: OSS and ALSA

2013-01-24 Thread Ralf Mardorf
On Thu, 24 Jan 2013 07:20:51 +0100, Oliver Lehmann oli...@freebsd.org  
wrote:

Hi Ralf,

the idea was to only comment out

BUILD_DEPENDS+= 
${LOCALBASE}/lib/oss/include/sys/soundcard.h:${PORTSDIR}/audio/oss


not the whole OSS4 block ;)

But Ma


Should I build it again? IMO it isn't needed, since OSS does work, even  
while everything is commented out.


Regards,
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: OSS and ALSA

2013-01-24 Thread Oliver Lehmann


Ralf Mardorf ralf.mard...@rocketmail.com wrote:

On Thu, 24 Jan 2013 07:20:51 +0100, Oliver Lehmann  
oli...@freebsd.org wrote:

Hi Ralf,

the idea was to only comment out

BUILD_DEPENDS+= 
${LOCALBASE}/lib/oss/include/sys/soundcard.h:${PORTSDIR}/audio/oss


not the whole OSS4 block ;)

But Ma


Should I build it again? IMO it isn't needed, since OSS does work,  
even while everything is commented out.


OK, probably it was autodetected. I'll commit my change later to enable
OSS support without the additional oss4 dependency.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Fwd: Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Ralf Mardorf
I was surpriesed, when Evolution from Linux had no permissions anymore to  
access the mail folder, after

drwxrwx--- rocketmouse  wheel was stable for FreeBSD

I wasn't aware, that even between Linux only, the folders for mount points  
share the same permissions, once the partition is mounted, since my Linux  
users usually share the same uid. I tested it some minutes ago.


However, I add a group freebsd (1001) to a Linux and chown/chmod most of  
the pass without -R option and for the mail directory I used the -R  
option, now everything _should_ work ...


$ ls -hAl /mnt
drwxrwx---  21 1000  rocketmouse   4.0k Oct 28 19:11 archlinux

but at the end of the pass I noticed this:

$ ls -hAl /mnt/archlinux/home/spinymouse/.local/share/evolution/mail
total 28
drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:37  
1323712251.1853.2@archlinux

drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:13 1353406324.3645.4@q
drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:13 1353606434.360.4@q
drwx--   2 1000  1000  4.0k Jan 24 02:37  
1358783158.2173.1@precise

drwxrwx---  17 1000  rocketmouse   4.0k Jan 24 02:37 local
drwxrwx---   4 1000  rocketmouse   4.0k Jan 24 02:10 trash
drwxrwx---   2 1000  rocketmouse   4.0k Jan 24 02:37 vfolder

I suspect I write-accessed /1358783158.2173.1@precise with a Linux that  
has no group 1001?


I'll add a group or user 1001 to all Linux and I'll add a user or group  
1000 to FreeBSD.


If I've done that, could I expect still any issues?

Regards
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


9.0 9.1-RELEASE and HP Proliant DL 360 G3

2013-01-24 Thread Peter Hunčár
Hello

Is there anybody runnign 9.0 and newer on HP Proliant DL 360 G3?
I'm not able to install anything newer than 8.3 on any of my Proliant G3
boxes.
Binary upgrade process from 8.3-RELEASE to 9.0-RELEASE after kernel upgrade
hangs at boot at the same place:
(8.3-RELEASE dmesg is at the bottom of the e-mail, the 8.3 kernel is
stripped only, no HW disabled)

Is there some HW/BIOS option I should disable to get this working? Or
9.0/9.1 simply won't run on those systems? I tried (almost) everything
(ACPI on/off, bios etc)

Thank you.

psm0: PS/2 Mouse irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Generic PS/2 mouse, device ID 0
uart0: 16550 or compatible port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
fdc0: floppy drive controller (FDE) port 0x3f2-0x3f5 irq 6 drq 2 on acpi0
fd0: 1440-KB 3.5 drive on fdc0 drive 0
pmtimer0 on isa0
orm0: ISA Option ROMs at iomem
0xc-0xc7fff,0xc8000-0xcbfff,0xcc000-0xcd7ff
,0xee000-0xe pnpid ORM on isa0
sc0: System console at flags 0x100 on isa0
sc0: VGA 16 virtual consoles, flags=0x300
vga0: Generic ISA VGA at port 0x3c0-0x3df iomem 0xa-0xb on isa0
atrtc0: AT realtime clock at port 0x70 irq 8 on isa0
atrtc0: Warning: Couldn't map I/O.
Event timer RTC frequency 32768 Hz quality 0
ppc0: parallel port not found.
p4tcc0: CPU Frequency Thermal Control on cpu0
p4tcc1: CPU Frequency Thermal Control on cpu1
p4tcc2: CPU Frequency Thermal Control on cpu2
p4tcc3: CPU Frequency Thermal Control on cpu3
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
ugen0.1: 0x1166 at usbus0
uhub0: 0x1166 OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1 on usbus0


8.3-RELEASE dmesg:
Copyright (c) 1992-2012 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.3-RELEASE #2: Mon Dec 10 17:10:11 CET 2012
r...@curie.chemnet.sk:/usr/obj/usr/src/sys/CURIE i386
Timecounter i8254 frequency 1193182 Hz quality 0
CPU: Intel(R) Xeon(TM) CPU 3.06GHz (3065.82-MHz 686-class CPU)
  Origin = GenuineIntel  Id = 0xf27  Family = f  Model = 2  Stepping = 7

Features=0xbfebfbffFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE
  Features2=0x4400CNXT-ID,xTPR
real memory  = 2147483648 (2048 MB)
avail memory = 2088177664 (1991 MB)
ACPI APIC Table: COMPAQ 0083
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 2 package(s) x 1 core(s) x 2 HTT threads
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP/HT): APIC ID:  1
 cpu2 (AP): APIC ID:  6
 cpu3 (AP/HT): APIC ID:  7
ACPI Warning: Invalid length for Pm1aControlBlock: 32, using default 16
(20101013/tbfadt-707)
ACPI Warning: Invalid length for Pm1bControlBlock: 32, using default 16
(20101013/tbfadt-707)
MADT: Forcing active-low polarity and level trigger for SCI
ioapic0 Version 1.1 irqs 0-15 on motherboard
ioapic1 Version 1.1 irqs 16-31 on motherboard
ioapic2 Version 1.1 irqs 32-47 on motherboard
ioapic3 Version 1.1 irqs 48-63 on motherboard
kbd1 at kbdmux0
acpi0: COMPAQ P31 on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
Timecounter ACPI-safe frequency 3579545 Hz quality 850
acpi_timer0: 32-bit timer at 3.579545MHz port 0x920-0x923 on acpi0
cpu0: ACPI CPU on acpi0
cpu1: ACPI CPU on acpi0
cpu2: ACPI CPU on acpi0
cpu3: ACPI CPU on acpi0
pcib0: ACPI Host-PCI bridge on acpi0
pci0: ACPI PCI bus on pcib0
vgapci0: VGA-compatible display port 0x2400-0x24ff mem
0xf600-0xf6ff,0xf5ff-0xf5ff0fff at device 3.0 on pci0
ciss0: Compaq Smart Array 5i port 0x2800-0x28ff mem
0xf5f8-0xf5fb,0xf5df-0xf5df3fff irq 31 at device 4.0 on pci0
ciss0: PERFORMANT Transport
ciss0: [ITHREAD]
pci0: base peripheral at device 5.0 (no driver attached)
pci0: base peripheral at device 5.2 (no driver attached)
isab0: PCI-ISA bridge at device 15.0 on pci0
isa0: ISA bus on isab0
atapci0: ServerWorks CSB5 UDMA100 controller port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x2000-0x200f at device 15.1 on pci0
ata0: ATA channel at channel 0 on atapci0
ata0: [ITHREAD]
ata1: ATA channel at channel 1 on atapci0
ata1: [ITHREAD]
ohci0: OHCI (generic) USB controller mem 0xf5e7-0xf5e70fff irq 10 at
device 15.2 on pci0
ohci0: [ITHREAD]
usbus0: OHCI (generic) USB controller on ohci0
pcib1: ACPI Host-PCI bridge on acpi0
pci1: ACPI PCI bus on pcib1
bge0: Compaq NC7781 Gigabit Server Adapter, ASIC rev. 0x001002 mem
0xf7ef-0xf7ef irq 30 at device 2.0 on pci1
bge0: CHIP ID 0x1002; ASIC REV 0x01; CHIP REV 0x10; PCI-X
miibus0: MII bus on bge0
brgphy0: BCM5703 10/100/1000baseTX PHY PHY 1 on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,
1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow
bge0: Ethernet address: 00:0b:cd:82:56:12
bge0: [ITHREAD]
pcib2: ACPI Host-PCI bridge on acpi0
pci4: ACPI PCI bus on pcib2
bge1: Compaq NC7781 Gigabit Server Adapter, 

Re: 9.0 9.1-RELEASE and HP Proliant DL 360 G3

2013-01-24 Thread Erich Dollansky
Hi,

On Thu, 24 Jan 2013 11:50:30 +0100
Peter Hunčár hu...@hunci.sk wrote:

 usbus0: 12Mbps Full Speed USB v1.0
 ugen0.1: 0x1166 at usbus0
 uhub0: 0x1166 OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1 on
 usbus0

so, it hangs here?

Should be the probing for the CD drive next?

I would check the settings for USB in the BIOS  and I would take the CD
drive out.

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

Crontabbing a Ruby script inside a screen

2013-01-24 Thread Dwayne Henderson
Hi, I run this Ruby + Sequel script inside a screen that records data from
this live stream 24/7. But it tends to core dump every once in a while, and
since I run it in a screen (so it's easy to check in on), I can't really
scroll up to catch the error whenever it happens.

So how do I crontab the screen with the Ruby script inside it? Has to be
with a don't run it if it's already running check to avoid fatal
consequences. So far I have:

$ crontab -e

*/10 * * * * lockf -t 0 /home/anonymous/.myscript.rb.lock
/usr/local/bin/screen -d -m -S myscript
/home/anonymous/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
/home/anonymous/myscript.rb

Thank you!

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


Re: Crontabbing a Ruby script inside a screen

2013-01-24 Thread Dwayne Henderson
On Thu, Jan 24, 2013 at 1:33 PM, Robert Klemme
shortcut...@googlemail.comwrote:


 I am not 100% sure what you want to achieve.  But it seems to me that
 it would be easier to wrap your Ruby script in something else that
 restarts the script if it crashes.  Like

 #!/usr/bin/dash

 # no cores
 ulimit -c 0

 while :; do
   /home/anonymous/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
 /home/anonymous/myscript.rb
 done

 And have screen start this script.


My God, Robert, this is brilliant :D

Thanks a bunch man. Nice blog too!

--Dwayne




 Kind regards

 robert

 --
 remember.guy do |as, often| as.you_can - without end
 http://blog.rubybestpractices.com/


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


Again: Security updates of individual porst

2013-01-24 Thread Ralf Mardorf

Oops, the security update issue isn't solved.
http://lists.freebsd.org/pipermail/freebsd-questions/2013-January/248511.html

# /usr/local/sbin/portaudit -Fda
Database created: Thu Jan 24 15:50:04 CET 2013
Affected package: chromium-24.0.1312.52
Type of problem: chromium -- multiple vulnerabilities.
Reference:  
http://portaudit.FreeBSD.org/8d03202c-6559-11e2-a389-00262d5ed8ee.html


# portmaster /usr/ports/www/chromium/
===  chromium-24.0.1312.52 has known vulnerabilities:
Affected package: chromium-24.0.1312.52
Type of problem: chromium -- multiple vulnerabilities.
Reference:  
http://portaudit.FreeBSD.org/8d03202c-6559-11e2-a389-00262d5ed8ee.html

= Please update your ports tree and try again.
*** [check-vulnerable] Error code 1

Stop in /usr/ports/www/chromium.
*** [build] Error code 1

Stop in /usr/ports/www/chromium.

=== make failed for www/chromium
=== Aborting update

Terminated

=== You can restart from the point of failure with this command line:
   portmaster flags www/chromium

So I have to # portsnap fetch update? If so, wouldn't it cause dependency  
issues, if I wouldn't update all ports?


Regards,
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Again: Security updates of individual porst

2013-01-24 Thread Polytropon
On Thu, 24 Jan 2013 16:17:34 +0100, Ralf Mardorf wrote:
 So I have to # portsnap fetch update?

Yes.



 If so, wouldn't it cause dependency  
 issues, if I wouldn't update all ports?

If you use portmaster to deal with updating your installation,
it will take care of the dependencies. However, it might lead
to unrelated ports being udated, too.

Example:

foo-1.0 has vulnerabilities.
Updating ports tree.
foo-1.1 is the safe version.
You're running portmaster foo.
foo is going to be be upgraded.
foo-1.1 relies on bar-2.5, whereas foo-1.0 relied on bar-2.2.
The portmaster run will also upgrade bar.

Possible problem:

baz-5.0 is installed and has been linked against bar-2.2.
baz itself doesn't need updating (not vulnerable).
Depending on how baz implements library calling (dependency),
it might have stopped working.

Solution:

Use portmaster -a to check all ports if they need updating.

Possible follow-up problem:

Ports you don't want to be updated (because you're totally happy
with the version you're running) will also be updated by this
command.

Solution:

Be selective in using portmaster and specify exactly the ports
you want to upgrade.

You can also use SVN to checkout only specific ports, but that
leads to an inconsistend ports tree which is not supported to
work (even though it _mostly_ will).






-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Disable monitor recording source

2013-01-24 Thread David Demelier
Hello,

I would like to record only from mic but I can't remove monitor from
recording :

markand@Melon ~ $ cat /dev/sndstat
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: ATI R6xx (HDMI) (play)
pcm1: Analog Devices AD1984A (Analog 2.0+HP/3.1) (play/rec) default
markand@Melon ~ $ mixer
Mixer vol  is currently set to  90:90
Mixer pcm  is currently set to  90:90
Mixer speaker  is currently set to   0:0
Mixer mic  is currently set to  90:90
Mixer rec  is currently set to  80:80
Mixer igainis currently set to   0:0
Mixer ogainis currently set to 100:100
Mixer monitor  is currently set to  80:80
Recording source: mic, monitor
markand@Melon ~ $ mixer -rec monitor
Recording source: mic, monitor
markand@Melon ~ $

What I'm doing wrong?

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


Re: Disable monitor recording source

2013-01-24 Thread Rod Person
On Thu, 24 Jan 2013 16:38:58 +0100
David Demelier demelier.da...@gmail.com wrote:

 Hello,
 
 I would like to record only from mic but I can't remove monitor from
 recording :
 
 markand@Melon ~ $ cat /dev/sndstat
 FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
 Installed devices:
 pcm0: ATI R6xx (HDMI) (play)
 pcm1: Analog Devices AD1984A (Analog 2.0+HP/3.1) (play/rec) default
 markand@Melon ~ $ mixer
 Mixer vol  is currently set to  90:90
 Mixer pcm  is currently set to  90:90
 Mixer speaker  is currently set to   0:0
 Mixer mic  is currently set to  90:90
 Mixer rec  is currently set to  80:80
 Mixer igainis currently set to   0:0
 Mixer ogainis currently set to 100:100
 Mixer monitor  is currently set to  80:80
 Recording source: mic, monitor
 markand@Melon ~ $ mixer -rec monitor
 Recording source: mic, monitor
 markand@Melon ~ $
 

I've never had this issues, but what about setting monitor to zero?

$ mixer monitor 0


-- 
Just because it can been done, does not mean it should be done.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Squid 3.2 Reverse Proxy Problems on FreeBSD

2013-01-24 Thread dweimer
Is anyone running else running the Squid 3.2 branch on FreeBSD as a 
reverse proxy?  Specifically using HTTPS and uploading data?


The reason I ask, I have a server Running FreeBSD 9.0-p4 and Squid 
3.1.21, all works I tried upgrading to a new server running FreeBSD 9.1 
with Squid 3.2.6, thought everything was working, then we started 
getting complaints on to of the back end applications.


Tracked the issue down to any submit forms on HTTPS, if somewhere 
between 2.2k and 3k it breaks, if the post is under that very small size 
instant success, if over that size the browser churns for a few minutes 
then returns a Bad Request Your browser sent a request that this server 
could not understand.  On the Squid side there is a TCP_MISS_ABORTED 
log entry that gets logged.  The problem doesn't show up on HTTP, I can 
upload large files, tested up to 50M.


I just wanted to see if any one else is successfully doing this, maybe 
something specific to my server build and I just need to start over.


Both servers have been built from source, both using clang, including 
ports, except on gcc, open-vm-tools, and squid.  They are both running 
on the same cluster of ESX 4.1 servers.  Other than the FreeBSD version 
and Squid version the other difference is ZFS used on the file system 
for the FreeBSD 9.1 and UFS used for the FreeBSD 9.0-p4.


I have already started a thread on the Squid mailing list on the issue 
as well, but haven't gotten any help yet.  But now that I have the 
production setup going through the old server again, I can do some more 
testing and enable debugging and possibly get some useful information as 
to whats happening.


--
Thanks,
   Dean E. Weimer
   http://www.dweimer.net/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: IPMI SOL setup on FreeBSD 9.1 amd64 supermicro X9SCM-F/X9CL-F

2013-01-24 Thread Derek Ragona

At 09:07 AM 1/23/2013, Anton Yuzhaninov wrote:

On Mon, 21 Jan 2013 22:52:17, Derek Ragona wrote:
DR I have a couple servers that are built using the supermicro 
X9SCM-F/X9CL-F

DR motherboards, and I can't quite get IPMI SOL working right.
DR
DR These motherboards have 3 NIC's.  One NIC is for a dedicated IPMI 
interface.

DR
DR I have both servers configured to use the dedicated IPMI NIC and these
DR NIC's are plugged into a separate unmanaged switch.
DR
DR Both systems boards are set to redirect com1.  I changed /etc/ttys to 
run a

DR getty on /dev/ttyu0.  I have com1 configured to 115,200 baud, 8, n, 1, no
DR flowcontrol in the BIOS.  I in have /etc/ttys:
DR ttyu0   /usr/libexec/getty std.115200 vt100   on secure

/etc/ttys:
ttyu1   /usr/libexec/getty std.115200 vt100   on  secure

/boot/loader.conf:
hint.uart.0.flags=0
hint.uart.1.flags=0x10
boot_serial=YES
boot_multicons=YES
comconsole_speed=115200
console=comconsole vidconsole


Anton,

Thanks for answering.

I thought:

/etc/ttys:
ttyu1   /usr/libexec/getty std.115200 vt100   on  secure


is for com2?

I also thought:
hint.uart.1.flags=0x10

Is for com2?

you said:
hint.uart.1.flags=0x10

Is that for for a serial only console?  I read in some posts, to use:
hint.uart.1.flags=0x30

for both a local console with a serial console.  I could not find much 
documentation on the uart or sio flags.


-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: Disable monitor recording source

2013-01-24 Thread David Demelier
On 24/01/2013 16:53, Rod Person wrote:
 On Thu, 24 Jan 2013 16:38:58 +0100
 David Demelier demelier.da...@gmail.com wrote:
 
 Hello,

 I would like to record only from mic but I can't remove monitor from
 recording :

 markand@Melon ~ $ cat /dev/sndstat
 FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
 Installed devices:
 pcm0: ATI R6xx (HDMI) (play)
 pcm1: Analog Devices AD1984A (Analog 2.0+HP/3.1) (play/rec) default
 markand@Melon ~ $ mixer
 Mixer vol  is currently set to  90:90
 Mixer pcm  is currently set to  90:90
 Mixer speaker  is currently set to   0:0
 Mixer mic  is currently set to  90:90
 Mixer rec  is currently set to  80:80
 Mixer igainis currently set to   0:0
 Mixer ogainis currently set to 100:100
 Mixer monitor  is currently set to  80:80
 Recording source: mic, monitor
 markand@Melon ~ $ mixer -rec monitor
 Recording source: mic, monitor
 markand@Melon ~ $

 
 I've never had this issues, but what about setting monitor to zero?
 
 $ mixer monitor 0
 
 

I tried, it completely mute recording
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


jails ip addresses

2013-01-24 Thread Fbsd8
Is there any situation where assigning the same IP address to a new jail 
that has already been assigned to a previous jail valid?


I think not, but want verification.

What are your thoughts?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Crontabbing a Ruby script inside a screen

2013-01-24 Thread Brian Seklecki (Mobile)


screen(1) is just going to fill a massive buffer, then eventually core.

You can capture stdout/stderr to a file using script(1) instead.  Its 
basically  the same as:


% nohup ./command 21 | tee -a ~/command.log 

~BAS

On Thu, 24 Jan 2013, Dwayne Henderson wrote:


Hi, I run this Ruby + Sequel script inside a screen that records data from
this live stream 24/7. But it tends to core dump every once in a while, and
since I run it in a screen (so it's easy to check in on), I can't really
scroll up to catch the error whenever it happens.

So how do I crontab the screen with the Ruby s

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


Re: Crontabbing a Ruby script inside a screen

2013-01-24 Thread Volodymyr Kostyrko

24.01.2013 13:27, Dwayne Henderson:

Hi, I run this Ruby + Sequel script inside a screen that records data from
this live stream 24/7. But it tends to core dump every once in a while, and
since I run it in a screen (so it's easy to check in on), I can't really
scroll up to catch the error whenever it happens.

So how do I crontab the screen with the Ruby script inside it? Has to be
with a don't run it if it's already running check to avoid fatal
consequences. So far I have:

$ crontab -e

*/10 * * * * lockf -t 0 /home/anonymous/.myscript.rb.lock
/usr/local/bin/screen -d -m -S myscript
/home/anonymous/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
/home/anonymous/myscript.rb


Another suggestion would be using daemon(8) with -r option.

--
Sphinx of black quartz, judge my vow.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


sh script ?

2013-01-24 Thread Fbsd8

I get this message [: 10.0.10.21: bad number on this code

   [ ${saved_ip} -eq ${used_ip} ]  echo good match

Both variables have valid ip addresses in them.
Why does it think the variable content is a number and not text?
What am I doing wrong?

Thanks for your help
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sh script ?

2013-01-24 Thread Teske, Devin
Use = for string comparison with the [ built-in and -eq for numerical 
comparison.

-- 
Devin

On Jan 24, 2013, at 10:07 AM, Fbsd8 fb...@a1poweruser.com wrote:

 I get this message [: 10.0.10.21: bad number on this code
 
   [ ${saved_ip} -eq ${used_ip} ]  echo good match
 
 Both variables have valid ip addresses in them.
 Why does it think the variable content is a number and not text?
 What am I doing wrong?
 
 Thanks for your help
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

_
The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sh script ?

2013-01-24 Thread Rick Miller
On Thu, Jan 24, 2013 at 1:07 PM, Fbsd8 fb...@a1poweruser.com wrote:
 I get this message [: 10.0.10.21: bad number on this code

[ ${saved_ip} -eq ${used_ip} ]  echo good match

 Both variables have valid ip addresses in them.
 Why does it think the variable content is a number and not text?
 What am I doing wrong?

The -eq operator is used to compare integers.  When comparing strings,
use the == operator.


-- 
Take care
Rick Miller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sh script ?

2013-01-24 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Thu Jan 24 12:11:42 2013
 Date: Thu, 24 Jan 2013 13:07:40 -0500
 From: Fbsd8 fb...@a1poweruser.com
 To: FreeBSD questions questi...@freebsd.org
 Subject: sh script ?

 I get this message [: 10.0.10.21: bad number on this code

 [ ${saved_ip} -eq ${used_ip} ]  echo good match

 Both variables have valid ip addresses in them.
 Why does it think the variable content is a number and not text?

Why??  BECAUSE YOU TOld IT TO.

RTFM applies.  Specifically 'man test'.

You need to either read some books on BASIC shell programming or
take a course or two on that subject.

This may sound harsh, but you will save yourself a -lot- of future
aggravation with some structured education.  It will also assist
you in getting maximum value from the manpages.

Programming _is_ an art-form.  You have to train yourself to think
the way the machine does.  When it complains about 'something', it
is *AlMOST*ALWAYS* correct, and something you -think- is correct
is actually wrong.  the hard thing to learn in troubleshooting
problems is to set aside what you know is correct, and look for
anything that could possibly cause the complaint.  Remember, you're
looking for something impossible.  grin



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


Re: sh script ?

2013-01-24 Thread Fbsd8

Robert Bonomi wrote:

From owner-freebsd-questi...@freebsd.org  Thu Jan 24 12:11:42 2013
Date: Thu, 24 Jan 2013 13:07:40 -0500
From: Fbsd8 fb...@a1poweruser.com
To: FreeBSD questions questi...@freebsd.org
Subject: sh script ?

I get this message [: 10.0.10.21: bad number on this code

[ ${saved_ip} -eq ${used_ip} ]  echo good match

Both variables have valid ip addresses in them.
Why does it think the variable content is a number and not text?


Why??  BECAUSE YOU TOld IT TO.

RTFM applies.  Specifically 'man test'.

You need to either read some books on BASIC shell programming or
take a course or two on that subject.

This may sound harsh, but you will save yourself a -lot- of future
aggravation with some structured education.  It will also assist
you in getting maximum value from the manpages.

Programming _is_ an art-form.  You have to train yourself to think
the way the machine does.  When it complains about 'something', it
is *AlMOST*ALWAYS* correct, and something you -think- is correct
is actually wrong.  the hard thing to learn in troubleshooting
problems is to set aside what you know is correct, and look for
anything that could possibly cause the complaint.  Remember, you're
looking for something impossible.  grin




Quit fishing for a flame.

You know nothing about my background and years of experience.
I have forgotten more about IT and programming than you will
ever learn in a life time.

You already read the 3 other reply posts and there was no need to
say what you did. You added nothing to the info in the thread.
The thread was basically ended already.

This is not the first time you have replied to posts in
this condescending manner.

I am putting you on notice, your manner and tone is not acceptable on 
this list. Please take more time to consider your replies before posting 
again.


Any further reply from you about this will be considered as flaming and 
ignored.





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


Re: [Bulk] Re: sh script ?

2013-01-24 Thread Mike Jeays
On Thu, 24 Jan 2013 16:16:54 -0500
Fbsd8 fb...@a1poweruser.com wrote:

 Robert Bonomi wrote:
  From owner-freebsd-questi...@freebsd.org  Thu Jan 24 12:11:42 2013
  Date: Thu, 24 Jan 2013 13:07:40 -0500
  From: Fbsd8 fb...@a1poweruser.com
  To: FreeBSD questions questi...@freebsd.org
  Subject: sh script ?
 
  I get this message [: 10.0.10.21: bad number on this code
 
  [ ${saved_ip} -eq ${used_ip} ]  echo good match
 
  Both variables have valid ip addresses in them.
  Why does it think the variable content is a number and not text?
  
  Why??  BECAUSE YOU TOld IT TO.
  
  RTFM applies.  Specifically 'man test'.
  
  You need to either read some books on BASIC shell programming or
  take a course or two on that subject.
  
  This may sound harsh, but you will save yourself a -lot- of future
  aggravation with some structured education.  It will also assist
  you in getting maximum value from the manpages.
  
  Programming _is_ an art-form.  You have to train yourself to think
  the way the machine does.  When it complains about 'something', it
  is *AlMOST*ALWAYS* correct, and something you -think- is correct
  is actually wrong.  the hard thing to learn in troubleshooting
  problems is to set aside what you know is correct, and look for
  anything that could possibly cause the complaint.  Remember, you're
  looking for something impossible.  grin
  
 
 
 Quit fishing for a flame.
 
 You know nothing about my background and years of experience.
 I have forgotten more about IT and programming than you will
 ever learn in a life time.
 
 You already read the 3 other reply posts and there was no need to
 say what you did. You added nothing to the info in the thread.
 The thread was basically ended already.
 
 This is not the first time you have replied to posts in
 this condescending manner.
 
 I am putting you on notice, your manner and tone is not acceptable on 
 this list. Please take more time to consider your replies before posting 
 again.
 
 Any further reply from you about this will be considered as flaming and 
 ignored.
 
 
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Well said.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 'svn-export' incrementing?

2013-01-24 Thread Xyne
Greg Larkin wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 1/22/13 8:29 PM, Peter Vereshagin wrote:
 Hello.
 
 I use the 'svn-export this way and expect it will try to update
 the 'work-tree' next time I run it:
 
 $ python3 svn-export-2013.1/svn-export
 http://svn.gna.org/svn/nasmail/trunk nasmail Exporting new
 repository. Exported revision 1546 [portato@screwed /tmp]$ ls -a
 nasmail .   decode  plugin_pack tests
 utilities ..  nasmail plugins
 translations [portato@screwed /tmp]$ python3
 svn-export-2013.1/svn-export http://svn.gna.org/svn/nasmail/trunk
 nasmail Exporting new repository. svn: E155000: Destination
 directory exists; please remove the directory or use --force to
 overwrite svn: E155000: 'nasmail' already exists error: Command
 '['svn', 'export', '-r', 'HEAD',
 'http://svn.gna.org/svn/nasmail/trunk', 'nasmail']' returned
 non-zero exit status 1
 
 I believe there is something wrong in the way I use the
 'svn-export'. Otherwise it's a no problem for me to patch for
 '--force'.
 
 How can I update the already created 'work tree' with 'svn update'?
 I think the correct answer is a good idea for 'Synopsis' docs
 section.
 

Hi Peter,

In order for svn-export to work in incremental mode, you need to use
the --revision-file argument like so:

python3 svn-export-2013.1/svn-export -r rev.dat
http://svn.gna.org/svn/nasmail/trunk nasmail

Then at some point in the future, run the same command.  svn-export
will read rev.dat, compare the version in there with the current HEAD
revision.  If they are different, the script creates a diff and
applies it to the local directory.

Hope that helps,
Greg

Hi,

The explanation is correct but the command example is not. It should be

svn-export --revision-file rev.dat ...

The reason for this is that svn-export does not include any SVN data with the
exported files so it has no way to determine what the currently exported
revision is from the directory alone. You could manually run

  svn-export -r local revision:HEAD ... 

but it would be tedious. The --revision-file option automates this by storing
the local export's revision number in a file. It is used to determine which
revision to diff against. Essentially it is the same as running

  svn-export -r $(cat rev.dat):...

I hope this clears things up.

Regards,
Xyne
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Fwd: Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Joshua Isom

On 1/24/2013 3:26 AM, Ralf Mardorf wrote:

I was surpriesed, when Evolution from Linux had no permissions anymore
to access the mail folder, after
drwxrwx--- rocketmouse  wheel was stable for FreeBSD

I wasn't aware, that even between Linux only, the folders for mount
points share the same permissions, once the partition is mounted, since
my Linux users usually share the same uid. I tested it some minutes ago.

However, I add a group freebsd (1001) to a Linux and chown/chmod most of
the pass without -R option and for the mail directory I used the -R
option, now everything _should_ work ...

$ ls -hAl /mnt
drwxrwx---  21 1000  rocketmouse   4.0k Oct 28 19:11 archlinux

but at the end of the pass I noticed this:

$ ls -hAl /mnt/archlinux/home/spinymouse/.local/share/evolution/mail
total 28
drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:37
1323712251.1853.2@archlinux
drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:13 1353406324.3645.4@q
drwxrwx---   3 1000  rocketmouse   4.0k Jan 24 02:13 1353606434.360.4@q
drwx--   2 1000  1000  4.0k Jan 24 02:37
1358783158.2173.1@precise
drwxrwx---  17 1000  rocketmouse   4.0k Jan 24 02:37 local
drwxrwx---   4 1000  rocketmouse   4.0k Jan 24 02:10 trash
drwxrwx---   2 1000  rocketmouse   4.0k Jan 24 02:37 vfolder

I suspect I write-accessed /1358783158.2173.1@precise with a Linux that
has no group 1001?

I'll add a group or user 1001 to all Linux and I'll add a user or group
1000 to FreeBSD.

If I've done that, could I expect still any issues?

Regards
Ralf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
freebsd-questions-unsubscr...@freebsd.org


If you're primarily using Linux and toying with FreeBSD, I'd just change 
your uid and gid to match what you use on linux.  If your Linux uid is 
1000 and your FreeBSD uid is 1001 you'll always have a problem.


Your best bet it to open up and edit /etc/passwd, /etc/master.passwd, 
and /etc/group and change all the 1001's to 1000.  You should be safe 
since the uid is so high.  Some programs expect certain things to be a 
certain uid, but you should be safe with 1000.  You'll have to remember 
to chown all the files.  Files are stored by the number, the name's for 
human.  I assume running these two commands should do it.


find / -uid 1001 -exec chown 1000 '{}' \;
find / -gid 1001 -exec chown :1000 '{}' \;
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: svn-export Re: svn bdb checkout?

2013-01-24 Thread Xyne
Greg Larkin wrote:

Hi Xyne,

Thanks for turning that around so quickly, and I am doing some testing
here with the idea to incorporate svn-export into the FreeBSD ports tree.

I've run into a couple of problems that I hope you can take a look at it:

- - Changesets containing directory or file deletions cause the script
to exit.  Here is an example where I fetched the FreeBSD ports tree at
a particular revision, then attempted to update to the latest revision:

# python3 svn-export --revision-file foo2.dat
http://svn.freebsd.org/head/ports-mgmt ports-mgmt
Determining current revision.
Current revision is 310894.
Determining changes [31:310894].
16 new/modified files, 5 deletions
Traceback (most recent call last):
  File svn-export, line 407, in module
svn.main()
  File svn-export, line 380, in main
self.remove_old_files(deleted)
  File svn-export, line 302, in remove_old_files
os.unlink(path)
PermissionError: [Errno 1] Operation not permitted: 'ports-mgmt/pkg/files'

- - I can't get the --to-script option to work if there are any
file/directory deletions in the changeset.  It looks like the actual
deletion operations are attempted (like above) even when the
- --to-script option is selected.

Let me know if you need any other information.

Thank you,
Greg


Hi,

I think I have fixed both errors in svn-export-2013.1.24, along with another
directory-related error that I discovered while debugging (attempts to cat new
directories in incremental exports instead of recursing them). Please try again
and let me know if it works.

If not, please post steps to reproduce the error with a publicly accessible
repo. I was unable to access the ports-mgmt repos in your example.

Incidentally, if anyone is looking at the code for svn-export, feel free to
suggest a better way to incrementally export new subdirectories (see the
get_new_files() method).

Incidentally, my release scripts do not leave old source archives on the
server for very long after a new release and I tend to update often when I
can. If you need me to increase the shelf life of old archives to prevent
404's, let me know (give me a reasonable interval and I will update my
scripts). In the future I may switch to posting my private Git repos, but I
tend to rewrite history and I know that really irks people.

Regards,
Xyne
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 'svn-export' incrementing?

2013-01-24 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 1/24/13 4:54 PM, Xyne wrote:
 Greg Larkin wrote:
 
 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
 
 On 1/22/13 8:29 PM, Peter Vereshagin wrote:
 Hello.
 
 I use the 'svn-export this way and expect it will try to
 update the 'work-tree' next time I run it:
 
 $ python3 svn-export-2013.1/svn-export 
 http://svn.gna.org/svn/nasmail/trunk nasmail Exporting new 
 repository. Exported revision 1546 [portato@screwed /tmp]$ ls
 -a nasmail .   decode  plugin_pack
 tests utilities ..  nasmail plugins 
 translations [portato@screwed /tmp]$ python3 
 svn-export-2013.1/svn-export
 http://svn.gna.org/svn/nasmail/trunk nasmail Exporting new
 repository. svn: E155000: Destination directory exists; please
 remove the directory or use --force to overwrite svn: E155000:
 'nasmail' already exists error: Command '['svn', 'export',
 '-r', 'HEAD', 'http://svn.gna.org/svn/nasmail/trunk',
 'nasmail']' returned non-zero exit status 1
 
 I believe there is something wrong in the way I use the 
 'svn-export'. Otherwise it's a no problem for me to patch for 
 '--force'.
 
 How can I update the already created 'work tree' with 'svn
 update'? I think the correct answer is a good idea for
 'Synopsis' docs section.
 
 
 Hi Peter,
 
 In order for svn-export to work in incremental mode, you need to
 use the --revision-file argument like so:
 
 python3 svn-export-2013.1/svn-export -r rev.dat 
 http://svn.gna.org/svn/nasmail/trunk nasmail
 
 Then at some point in the future, run the same command.
 svn-export will read rev.dat, compare the version in there with
 the current HEAD revision.  If they are different, the script
 creates a diff and applies it to the local directory.
 
 Hope that helps, Greg
 
 Hi,
 
 The explanation is correct but the command example is not. It
 should be
 
 svn-export --revision-file rev.dat ...
 
 The reason for this is that svn-export does not include any SVN
 data with the exported files so it has no way to determine what the
 currently exported revision is from the directory alone. You could
 manually run
 
 svn-export -r local revision:HEAD ...
 
 but it would be tedious. The --revision-file option automates
 this by storing the local export's revision number in a file. It is
 used to determine which revision to diff against. Essentially it is
 the same as running
 
 svn-export -r $(cat rev.dat):...
 
 I hope this clears things up.
 
 Regards, Xyne
 

Hi Xyne,

Thanks for catching that.  I had intended to write --revision-file,
but PEBKAC took over!

Cheers,
Greg

- -- 
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/cpucycle/  - Follow you, follow me
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.13 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlEBz5oACgkQ0sRouByUApBHUACeP/a83cmkE2EUn2rRL1b1MfaR
8sYAn3ycyyi2wfT2fFEp2KYkMR4V8OCu
=SY/z
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: sh script ?

2013-01-24 Thread John Levine
I get this message [: 10.0.10.21: bad number on this code

[ ${saved_ip} -eq ${used_ip} ]  echo good match

Both variables have valid ip addresses in them.
Why does it think the variable content is a number and not text?
What am I doing wrong?

My guess would be that you didn't read the man page for the test
(sometimes spelled [ ) command.



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


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Ralf Mardorf
Hi all, hi Joshua,

On Thu, 2013-01-24 at 16:10 -0600, Joshua Isom wrote:
 find / -uid 1001 -exec chown 1000 '{}' \;
 find / -gid 1001 -exec chown :1000 '{}' \;

I made one mistake, when I run find / -gid 1001 -exec chown :1000 '{}'
\; for the fist time, I did it without the :. Later I run it without
the typo.

There's a serious problem now, rocketmouse still is 1001.

.login_conf was '1000 1001', after I chown 1001 it, to start X as
user, it became 'rocketmouse 1001', the user rocketmouse still can't run
a X session anymore.

After rebooting this is the output I get:

# id rocketmouse
uid=1001(rocketmouse) gid=1001 groups=1001,0(wheel)

# ls -hAl /home/ | grep rocketmouse
drwxr-xr-x  28 1000 rocketmouse   1.5k Jan 24 18:14 rocketmouse

# grep 100 /etc/group
rocketmouse:*:1000:
musicpd:*:1002:

# grep 100 /etc/passwd
rocketmouse:*:1000:1000:Ralf:/home/rocketmouse:/bin/sh
musicpd:*:1002:1002:Music Player Daemon:/home/musicpd:/usr/sbin/nologin

# grep 100 /etc/master.passwd
rocketmouse:$1$3mMkzcfl
$VuryrlzFZ92LmaC6cUOa/.:1000:1000::0:0:Ralf:/home/rocketmouse:/bin/sh
musicpd:*LOCKED**:1002:1002:daemon:0:0:Music Player
Daemon:/home/musicpd:/usr/sbin/nologin

I repeated both find-chown several times and rebooted, nothing changed,
it doesn't list any files anymore.

Regards,
Ralf


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


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Erich Dollansky
Hi,

On Fri, 25 Jan 2013 02:11:27 +0100
Ralf Mardorf ralf.mard...@rocketmail.com wrote:

 Hi all, hi Joshua,
 
 On Thu, 2013-01-24 at 16:10 -0600, Joshua Isom wrote:
  find / -uid 1001 -exec chown 1000 '{}' \;
  find / -gid 1001 -exec chown :1000 '{}' \;
 
 I made one mistake, when I run find / -gid 1001 -exec chown :1000
 '{}' \; for the fist time, I did it without the :. Later I run it
 without the typo.
 
 There's a serious problem now, rocketmouse still is 1001.
 
 .login_conf was '1000 1001', after I chown 1001 it, to start X as
 user, it became 'rocketmouse 1001', the user rocketmouse still can't
 run a X session anymore.
 
 After rebooting this is the output I get:
 
 # id rocketmouse
 uid=1001(rocketmouse) gid=1001 groups=1001,0(wheel)
 
 # ls -hAl /home/ | grep rocketmouse
 drwxr-xr-x  28 1000 rocketmouse   1.5k Jan 24 18:14 rocketmouse
 
 # grep 100 /etc/group
 rocketmouse:*:1000:
 musicpd:*:1002:
 
 # grep 100 /etc/passwd
 rocketmouse:*:1000:1000:Ralf:/home/rocketmouse:/bin/sh
 musicpd:*:1002:1002:Music Player
 Daemon:/home/musicpd:/usr/sbin/nologin
 
 # grep 100 /etc/master.passwd
 rocketmouse:$1$3mMkzcfl
 $VuryrlzFZ92LmaC6cUOa/.:1000:1000::0:0:Ralf:/home/rocketmouse:/bin/sh
 musicpd:*LOCKED**:1002:1002:daemon:0:0:Music Player
 Daemon:/home/musicpd:/usr/sbin/nologin
 
 I repeated both find-chown several times and rebooted, nothing
 changed, it doesn't list any files anymore.
 
did you run something like?

/usr/sbin/pwd_mkdb -d/etc /etc/master.passwd

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


Re: How to see all labels?

2013-01-24 Thread Carl Johnson
Carl Johnson ca...@peak.org writes:

 I recently installed 9.1 on a system and labels don't seem to work as
 I would expect.  I can get them to work in /etc/fstab, but only the
 ones referenced there show up in /dev/ufs and /dev/gpt.  I have seen
 this in previous versions, and in those cases they sometimes work.  In
 at least one previous case one ufs label (of several) would never work
 even in fstab.  The following shows my current configuration:

   $ uname -a
   FreeBSD bonsai.localnet 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825:
   Tue Dec  4 09:23:10 UTC 2012
   r...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64  
   $ gpart backup ada0
   GPT 128
   1   freebsd-boot   64  128  
   2freebsd-ufs  192 35651584 Bonsai 
   3   freebsd-swap 35651776  4224671 BonsaiSwap 
   $ glabel status
 Name  Status  Components
   gptid/150b03ac-5767-11e2-a154-001485411fc8 N/A  ada0p1
   ufs/Bonsai N/A  ada0p2
   gpt/BonsaiSwap N/A  ada0p3
   $ ls -l /dev/ufs
   total 0
   crw-r-  1 root  operator0, 109 2013-01-08 09:42 Bonsai
   $ ls -l /dev/gpt
   total 0
   crw-r-  1 root  operator0, 112 2013-01-08 09:42 BonsaiSwap
   $ cat /etc/fstab
   # DeviceMountpoint  FStype  Options DumpPass#
   #/dev/ada0p2/   ufs rw  1   1
   #/dev/ada0p3noneswapsw  0   0
   /dev/ufs/Bonsai /   ufs rw  1   1
   /dev/gpt/BonsaiSwap noneswapsw  0   0

 In this case I have two GPT labels defined, but only the one used in
 fstab (BonsaiSwap) is shown in /dev/gpt and by glabel.  When I used
 the original fstab without labels, there were no /dev/gpt or /dev/ufs
 directories, and glabel didn't show any of them.

 Does anybody have any ideas about how to get the system to recognize
 all labels?  A command after boot would be acceptable since I could
 just put it in /etc/rc.local.

I just discoved the sysctl 'kern.geom.label.debug=2' and did some
further testing.  It appears that the system removes what it considers
redundant labels.  For the Bonsai label it has labels for ufs, ufsid,
gpt, and gptid;  so it removes the ufsid, gpt, and gptid labels after I
use the ufs label.  The swap partition has gpt and gptid labels, and it
removes the gptid label after I use the gpt label.  I don't really agree
with it, but I feel better about it now that I think I understand what
it is doing.

-- 
Carl Johnsonca...@peak.org

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


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Ralf Mardorf
Thank you Kevin, thank you Erich,

On Thu, 2013-01-24 at 21:10 -0500, kpn...@pobox.com wrote:
 The correct way to edit the password file is with the vipw
 command. When you are done with your changes it rewrites the password
 file AND rebuilds the password database.
 
 I'm guessing you have a stale password database now. Use 'vipw' to 
 make a trivial change and then save and exit out.

Ok, I used mcedit to make the changes before and will try vipw now,
resp. ...

On Fri, 2013-01-25 at 10:06 +0700, Erich Dollansky wrote:
 did you run something like?
 
 /usr/sbin/pwd_mkdb -d/etc /etc/master.passwd

No, I didn't. I assume this is what vipw will do, so I can run this
instead of using vipw?

Once the information has been verified, vipw uses pwd_mkdb(8) to update
the user database.  This is run in the background, and, at very large
sites could take severa minutes. Until this update is completed, the
password file is unavailable for other updates and the new information
is not available to programs. -
http://www.freebsd.org/cgi/man.cgi?query=vipwsektion=8

Regards,
Ralf

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


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Polytropon
On Fri, 25 Jan 2013 02:11:27 +0100, Ralf Mardorf wrote:
 Hi all, hi Joshua,
 
 On Thu, 2013-01-24 at 16:10 -0600, Joshua Isom wrote:
  find / -uid 1001 -exec chown 1000 '{}' \;
  find / -gid 1001 -exec chown :1000 '{}' \;
 
 I made one mistake, when I run find / -gid 1001 -exec chown :1000 '{}'
 \; for the fist time, I did it without the :. Later I run it without
 the typo.
 
 There's a serious problem now, rocketmouse still is 1001.

You should have been reading my advice about changing the
UID:GID in detail. :-)

What you seem to be missing is a rebuild of the database
that reflects the content of the password files (where you
have properly made the changes 1001 - 1000 in /etc/passwd,
/etc/master.passwd and /etc/group).

The command you're searching for is pwd_mkdb.



 .login_conf was '1000 1001', after I chown 1001 it, to start X as
 user, it became 'rocketmouse 1001', the user rocketmouse still can't run
 a X session anymore.

UIDs and GIDs should match here. All files belonging to rocketmouse
should be 1000:1000 _and_ the name rocketmouse should be
associated to those numerical values (see files mentioned
above).



 After rebooting this is the output I get:

Rebooting is _not_ the way to make a probem magically
go away. :-)



 # id rocketmouse
 uid=1001(rocketmouse) gid=1001 groups=1001,0(wheel)

This means the change of 1001 - 1000 has not been fully done,
in _all_ involved files.



 # ls -hAl /home/ | grep rocketmouse
 drwxr-xr-x  28 1000 rocketmouse   1.5k Jan 24 18:14 rocketmouse

Here, on file system level, the UID has been changed to 1000
properly, but this UID still doesn't have a matching name.



 # grep 100 /etc/group
 rocketmouse:*:1000:
 musicpd:*:1002:
 
 # grep 100 /etc/passwd
 rocketmouse:*:1000:1000:Ralf:/home/rocketmouse:/bin/sh
 musicpd:*:1002:1002:Music Player Daemon:/home/musicpd:/usr/sbin/nologin
 
 # grep 100 /etc/master.passwd
 rocketmouse:$1$3mMkzcfl
 $VuryrlzFZ92LmaC6cUOa/.:1000:1000::0:0:Ralf:/home/rocketmouse:/bin/sh
 musicpd:*LOCKED**:1002:1002:daemon:0:0:Music Player
 Daemon:/home/musicpd:/usr/sbin/nologin

All correct.

But pwd.db and spwd.db (the password databases with encrypted
content) don't reflect those informations!



 I repeated both find-chown several times and rebooted, nothing changed,
 it doesn't list any files anymore.

No, repeating what has already been done properly and then
rebooting is, as I said, not a way to make problems magically
go away. I don't know a setting where this should work... :-)

So here's what you need to do: Read man pwd_mkdb and rebuild
the databases.

If you would have used the vipw command to make the change
to the passwd (plain text) files, it would have called pwd_mkdb
after the change. But don't worry: Knowing those low level hacks
can be helpful in some worst-case scenario. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Ralf Mardorf
On Fri, 2013-01-25 at 08:03 +0100, Polytropon wrote:
 You should have been reading my advice about changing the
 UID:GID in detail. :-)

I deleted it by accident from the until now _not_ shared mails, IOW I
deleted it from the FreeBSD mails only and missed it, when having a
brief look at the mailing list archive.

 UIDs and GIDs should match here. All files belonging to rocketmouse
 should be 1000:1000 _and_ the name rocketmouse should be
 associated to those numerical values (see files mentioned
 above).

Yes, but because I missed to update the database X login asked for 1001.

 But pwd.db and spwd.db (the password databases with encrypted
 content) don't reflect those informations!

So '# /usr/sbin/pwd_mkdb -d/etc /etc/master.passwd' is ok, regarding
to ...

 man pwd_mkdb and rebuild
 the databases.

-c and -u switches could be used too, but aren't needed, since the
entries are correct.

 If you would have used the vipw command to make the change
 to the passwd (plain text) files, it would have called pwd_mkdb
 after the change. But don't worry: Knowing those low level hacks
 can be helpful in some worst-case scenario. :-)

And then I don't need to use vi, if the default text editor still should
be vi.

Thank you!

Regards,
Ralf

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


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Polytropon
On Fri, 25 Jan 2013 07:51:30 +0100, Ralf Mardorf wrote:
 Thank you Kevin, thank you Erich,
 
 On Thu, 2013-01-24 at 21:10 -0500, kpn...@pobox.com wrote:
  The correct way to edit the password file is with the vipw
  command. When you are done with your changes it rewrites the password
  file AND rebuilds the password database.
  
  I'm guessing you have a stale password database now. Use 'vipw' to 
  make a trivial change and then save and exit out.
 
 Ok, I used mcedit to make the changes before and will try vipw now,
 resp. ...

That won't make any difference. :-)

If your $EDITOR points to mcedit, _that_ editor will be used;
afterwards pwd_mkdb will be called and the binary database
files will be updated - and your changes will be fine.



 On Fri, 2013-01-25 at 10:06 +0700, Erich Dollansky wrote:
  did you run something like?
  
  /usr/sbin/pwd_mkdb -d/etc /etc/master.passwd
 
 No, I didn't. I assume this is what vipw will do, so I can run this
 instead of using vipw?

Yes, because vipw can be seen as a chain editor - validate -
update database, involving the lower level programs that you
can call yourself any time. :-)






-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Sharing a mail folder between Linux and FreeBSD

2013-01-24 Thread Polytropon
On Fri, 25 Jan 2013 08:32:55 +0100, Ralf Mardorf wrote:
 On Fri, 2013-01-25 at 08:03 +0100, Polytropon wrote:
  UIDs and GIDs should match here. All files belonging to rocketmouse
  should be 1000:1000 _and_ the name rocketmouse should be
  associated to those numerical values (see files mentioned
  above).
 
 Yes, but because I missed to update the database X login asked for 1001.

Correct - several programs query that database instead of
the plain text files.



  But pwd.db and spwd.db (the password databases with encrypted
  content) don't reflect those informations!
 
 So '# /usr/sbin/pwd_mkdb -d/etc /etc/master.passwd' is ok, regarding
 to ...

Yes, use that command.



  man pwd_mkdb and rebuild
  the databases.
 
 -c and -u switches could be used too, but aren't needed, since the
 entries are correct.

It's not needed to make things that complicated (to selectively
deal with entries, for example). The simple thing of

# cd /etc
# pkd_mkdb /etc/master.passwd

should do the trick here.



  If you would have used the vipw command to make the change
  to the passwd (plain text) files, it would have called pwd_mkdb
  after the change. But don't worry: Knowing those low level hacks
  can be helpful in some worst-case scenario. :-)
 
 And then I don't need to use vi, if the default text editor still should
 be vi.

The $EDITOR variable will be honored, and as long as the program
is available (and the terminal capabilities apply), it will work
as expected. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org