Re: [CentOS] Virtual Machine Manager Doesn't see vmx flag

2011-03-16 Thread Johnny Hughes
On 03/15/2011 08:17 PM, David McGuffey wrote:
> 
> On Tue, 2011-03-15 at 21:21 +0100, Athmane Madjoudj wrote:
>> On 03/15/2011 12:54 PM, David McGuffey wrote:
>>> Finished installing CentOS 5.5 x86_64 on a new Dell tower workstation
>>> that has a quad core Intel processor and 8 GB of ram.  BIOS has hardware
>>> virtualization support enabled. /proc/cpuinfo shows that all four cores
>>> have the vmx flag present.
>>>
>>> I applied a lot of the National Security Agency guide for securing Red
>>> Hat Linux 5, testing the key applications I need as I went.  At the end
>>> of the process I bring up VMM and it claims that the hardware doesn't
>>> support full virtualization.
> 
>> Can you see if kvm modules are loaded:
>>
>> lsmod | grep kvm
>>
>> Example in my laptop (Intel C2D):
>>
>> $ lsmod | grep kvm
>> kvm_intel  41950  0
>> kvm   257356  1 kvm_intel
>>
>> HTH
> 
> I'll check tomorrow when I'm at the machine.

Did you verify that this was working before applying those settings in
the NSA guide?

What does/is VMM "claiming" ... are you seeing only fully virtualized
and not paravirtualized as a selection or what is the problem that you
are encountering?  I am not an expert on KVM, but when I install a KVM
VM in Virtual Machine Manager, I have to select "Fully Virtualized"
initally, then if I want to install the virtio (paravirtualized)
drivers, I need to do it like this:

http://www.cyberciti.biz/faq/centos-rhel-linux-kvm-virtulization-tutorial/

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization/chap-Virtualization-KVM_restrictions_and_support.html

I am fairly sure that only if you are running Xen will you actually see
a "Paravirtualized" selection in Virtual Machine Manager ... however I
would suggest that you use KVM and not Xen as KVM is where RHEL
Virtualization is moving towards and Xen is being moved away from.

The BIOS of many machines can "disable" virtual machine extensions (also
called other things ... usually with Virtual, Virtual Technologies, or
VT in the name).  According to KVM (link below), sometimes certain
settings do need to be turned off while others need to be on, so there
may be a specific set of on and off that make it work on this type of
machine.

So, it is possible for vmx to show up in the cpu flags but for it to be
disabled.  Specifically, some Dell machines need "Trusted Computer" or
"Trusted Execution" enabled as well.

http://www.linux-kvm.org/page/FAQ#.22KVM:_disabled_by_BIOS.22_error

Verifying the latest version of the BIOS is installed can be very
important for memory sizes greater than 4 GB of RAM and proper APIC
operation on Linux as well.  If you need to flash the BIOS on a Dell
machine that has Linux installed, I use a "Free DOS" iso to boot from
and put the Dell BIOS on my USB key, which is normally detected as C: or
D: on my machines when booting the "Free Dos" ISO.  I use fdfullcd.iso
from here (use the LiveCD and do NOT install Free DOS on your main drive
:D):

http://www.freedos.org/freedos/files/

Some machines (if Linux is supported on them) have the ability to flash
the BIOS via Linux, but I normally do it via FreeDOS anyway.  Here is
the Dell Linux site with repositories if applicable:

 http://linux.dell.com/

There is a link on the right hand side named "Dell Community Repository"
that goes here:

http://linux.dell.com/repo/community/





signature.asc
Description: OpenPGP digital signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] install specific version using yum

2011-03-16 Thread Johnny Hughes
On 03/15/2011 04:32 PM, Tim Dunphy wrote:
> Hello list!
> 
>  I have been instructed to install very specific version numbers of
> httpd and php on the company web servers. Here's what I've tried so
> far
> 
> [root@ec2-50-17-114-126 ~]# yum install php-5.2.17-1.w5.i386
> Loaded plugins: fastestmirror
> Loading mirror speeds from cached hostfile
>  * addons: yum.singlehop.com
>  * base: mirror.rackspace.com
>  * epel: nas1.itc.virginia.edu
>  * extras: centos.supsec.org
>  * updates: pubmirrors.reflected.net
> Setting up Install Process
> No package php-5.2.17-1.w5.i386 available.
> Error: Nothing to do
> 
> 
> [root@ec2-50-17-114-126 ~]# yum install php-5.2.17-1.w5
> Loaded plugins: fastestmirror
> Loading mirror speeds from cached hostfile
>  * addons: yum.singlehop.com
>  * base: mirror.rackspace.com
>  * epel: nas1.itc.virginia.edu
>  * extras: centos.supsec.org
>  * updates: pubmirrors.reflected.net
> Setting up Install Process
> No package php-5.2.17-1.w5 available.
> Error: Nothing to do
> 
> 
> [root@ec2-50-17-114-126 ~]# yum install php-5.2.17
> Loaded plugins: fastestmirror
> Loading mirror speeds from cached hostfile
>  * addons: yum.singlehop.com
>  * base: mirror.rackspace.com
>  * epel: nas1.itc.virginia.edu
>  * extras: centos.supsec.org
>  * updates: pubmirrors.reflected.net
> Setting up Install Process
> No package php-5.2.17 available.
> 
> 
>  I was wondering if someone would mind sharing the best way to do this?
> 
> thanks!!
> 
> tim
> 

And just for the record, it has already been stated before, however,
there is NO 5.2.17 php in RHEL (and therefore it is also not in CentOS).
 Whoever told you what to install is not familiar with the Red Hat
policy called "backporting":

www.redhat.com/advice/speaks_backport.html

The latest version of php in main RHEL is php-5.1.6-27.el5_5.3.src.rpm.
 There is also a php53-5.3.3-1.el5_6.1.src.rpm.  Those specific packages
are in the 5.6 updates which are in QA testing right now, but there is
php-5.1.6 and php53 in CentOS-5.5 as well.  Anything else is from a 3rd
party repository and may or may not work well with CentOS ... we have no
control over what is or is not in 3rd party repos.



signature.asc
Description: OpenPGP digital signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Epel and yum downgrade : possible ?

2011-03-16 Thread Neil Viglieno
> Thanks Ned and Nico. 
>
> Yes, "yum downgrade dokuwiki" says there is nothing available. I can 
> rebuild version 20091225.c from dokuwiki.org, but I don't know if
> there where any patches added by Epel, and this is likely.
>
> My guess is the source rpm for Epel was the same as the source rpm 
> for Fedora, so I am going to try this one.
>
> I will be more careful with packages coming from other repos than
> CentOS...
>
> Thanks again,
>
> -- 
> Philippe

EPEL uses koji.fedoraproject.org to build the packages so the source and binary 
rpms are on koji.

http://koji.fedoraproject.org/koji/buildinfo?buildID=151881

Regards
Neil

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] problems creating read-only, 'consumer' dirsrv replica

2011-03-16 Thread Jon Detert
Hello,

I am trying to deploy an additional read-only replica (aka.
'consumer') in a single-master dirsrv environment.

The master, and the other pre-existing consumer servers, are all
'fedora-ds' running on Fedora 7.  I'm trying to add a consumer running
on Centos 5.5.  Ultimately, I intend to replace the Fedora ds servers
with Centos dirsrv servers.

I'm trying to deploy the Centos dirsrv consumer without running the
dirsrv-admin.

I've been following the directions at
http://docs.redhat.com/docs/en-US/Red_Hat_Directory_Server/8.1/html/Administration_Guide/index.html
, specifically in chapter 8.  When I get to "8.7.2. Configuring
Consumers from the Command Line" (
http://docs.redhat.com/docs/en-US/Red_Hat_Directory_Server/8.1/html/Administration_Guide/Managing_Replication-Configuring-Replication-cmd.html#Configuring-Replication-Consumers-cmd
),  I run into problems:

1) ldapmodify complains that I'm missing the required attribute
'nsds5replicaId'.  So I add it, and guess at the replicaID number (cuz
the guide says nothing about the ID).

2) even after resolving issue 1) above, I get an error: "ldap_add: No
such object"
The return value of the ldapmodify command is 32.
The changetype of the operation is 'add', so ldapmodify knows it's
trying to add an object.

The input I pass to ldapmodify is just like shown in the guide, but w.
the addition of the nsds5replicaId attribute mentioned in issue 1)
above:
dn: cn=replica,cn="dc=infinityhealthcare,dc=com",cn=mapping tree,cn=config
changetype: add
objectclass: top
objectclass: nsds5replica
objectclass: extensibleObject
cn: replica
nsds5replicaroot: dc=infinityhealthcare,dc=com
nsds5replicatype: 2
nsDS5ReplicaId: 65535
nsds5ReplicaBindDN: uid=RManager,cn=config
nsds5flags: 0

Any idea what's wrong?  Do I have to first create dn:
cn="dc=infinityhealthcare,dc=com",cn=mapping tree,cn=config ?  If so,
how?  The guide doesn't seem to have a step for that, except for when
adding a 'hub' dirsrv.  However, I mean to add a 'consumer', not a
'hub'.

Thanks,

Jon
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Mumble gamers' VOIP server (murmur)

2011-03-16 Thread Michael Simpson
On 15 March 2011 19:07, Kenneth Porter  wrote:
>
> BTW, I found that the initscript included in the Fedora RPM launches the
> server as root instead of mumble-server (unprivileged user) and murmur must
> drop privs once started. This causes the log file and sqlite DB to be
> created owned by root, which causes problems later. The fix is to use the
> --user option in the initscript. I need to cut another SRPM to address that.
>

I suppose that if you are using the default non-privileged port then
there is no reason to start as root then drop to mumble-server user. I
don't see this behaviour in the mandriva rpm files that i cut out and
used.
Next stop is getting SELinux to play nicely with it.
It is also just another bit of software that i have to track manually
though would be much happier to have it in the RPM database as my
"check for updates" bookmarked tab group is getting longer and more
painful to use.

mike
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS 5.5 does not recognise SAS drives with LSI 1068E Controller

2011-03-16 Thread Peter Peltonen
I have now partially solved my problem:

On Wed, Mar 9, 2011 at 5:55 PM, Peter Peltonen  wrote:
> I need to do a new CentOS net install on a new server having the
> Supermicro X7DVL-3 motherboard:

[...]

> So I assume the controller is not supported and I need a binary driver
> for it. For 1068e it should be:

I received the driver image megasr-13.17.0421.2010-1-rhel50-u5-all.img
from the hardware vendor and was able to use it as the driver disk for
installation.

Upgrading the kernel issue is still unresolved though:

> And what happens if I get the driver installed and then the server's
> kernel is updated? Do I need reinstall the driver somehow?

After updates the system is unable to boot with the new kernel as it
cannot find the megasr driver.

What shoudl I do? Does the megasr module for the old kernel also work
with the new kernel => do I need to copy it somewhere and create an
initrd  image including that module? Or do I need to find an updated
megasr module from somewhere?

Best regards,
Peter
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Epel and yum downgrade : possible ?

2011-03-16 Thread John R Pierce
On 03/08/11 7:53 AM, Philippe Naudin wrote:
> Hello,
>
> Is it possible to downgrade to an old version of a package on epel ? I
> am in troubles with the new dokuwiki-0-0.6.20101107.a.el5, and cannot
> find dokuwiki-0-0.4.20091225.c.el5.noarch...

dokuwiki is -just- a php website, it doesn't even need/use a SQL 
database.  Frankly, for this sort of thing I don't bother with RPM 
package management, instead, I create a user for the app, and put it in 
that user's public_html, then create a virtualhost file in /etc/httpd/conf.d


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] perl one-liner issue

2011-03-16 Thread Joseph L. Casale
I am trying to deduce the one liner for an rpm I am packaging to edit a php
configuration file from within my spec. The line I am editing looks like:

$conf['nagios_base'] = "/nagios/cgi-bin";

What are the escape requirements Perl needs from within the shell to
search for this?

As I have seen, the syntax is a mess, any pointers would be appreciated!
thanks,
jlc
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] perl one-liner issue

2011-03-16 Thread John R Pierce
On 03/16/11 12:56 PM, Joseph L. Casale wrote:
> $conf['nagios_base'] =

I'd just search for that part, above.


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] skype?

2011-03-16 Thread m . roth
Well, at the urging of a friend who wants to talk face-to-face, I tried to
install skype to my system at home (current CentOS 5.5). Got the fedora
rpm; yum installed a library, then localinstalled skype, which is the
current 2.1 beta.

ldd shows an entry to linux-gate, which I don't have installed (or at
least rpm tells me I don't). I try to run skype, and it complains about
the version of glibc, even though I do have libstdc++.so.6.

So, does anyone have any suggestions on a) how to get 2.1 beta working, or
b) where I can find the *non* beta previous version...?

Thanks in advance.

   mark "clues for the poor!"

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] perl one-liner issue

2011-03-16 Thread Joseph L. Casale
>> $conf['nagios_base'] =
>
>I'd just search for that part, above.

Me to, and I never even got to the replacement as the search for that
was bailing:)
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] skype?

2011-03-16 Thread Akemi Yagi
On Wed, Mar 16, 2011 at 1:37 PM,   wrote:
> Well, at the urging of a friend who wants to talk face-to-face, I tried to
> install skype to my system at home (current CentOS 5.5). Got the fedora
> rpm; yum installed a library, then localinstalled skype, which is the
> current 2.1 beta.
>
> ldd shows an entry to linux-gate, which I don't have installed (or at
> least rpm tells me I don't). I try to run skype, and it complains about
> the version of glibc, even though I do have libstdc++.so.6.
>
> So, does anyone have any suggestions on a) how to get 2.1 beta working, or
> b) where I can find the *non* beta previous version...?

Try the static version. Here's the CentOS wiki:

http://wiki.centos.org/HowTos/Skype

Akemi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Watching a directory

2011-03-16 Thread Jason Slack-Moehrle
Hi All,

I am thinking about an idea, but it requires that I be able to watch several
directories for files that are added, deleted or maybe changed.

Let start with adding files. What tools are available for me to watch a
directory. In an example, if a file is added to a directory I want to run a
shell script that will do some conversation on the file to produce a second
copy.

I have the shell scripting down, I am not sure how to watch, realize change
and kick off the script with the parameters of the directory and what was
added.

Would anyone have thoughts?

-Jason


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] CentOS 5.5 does not recognise SAS drives with LSI 1068E Controller

2011-03-16 Thread Brandon Ooi
Hi Peter,

I too was very undecided about using the LSI 1068e (on-board many supermicro
boards) in production for this very reason. The problem is that chipset is
basically unsupported by LSI and updates to it are sometimes necessary to
maintain compatibility. The driver won't build sometimes on updated kernels
forcing you to hold onto a particular version.  Even if you could get away
from that, the driver is black box and we found it to be somewhat unreliable
(read: crashy). I believe even in IT mode that chipset requires a different
driver (not megasr, mptsas?) and was also black box.

We decided after a few update mistakes and trips to the datacenter, it
wasn't worth it. I suggest instead buying a separate megaraid card (highly
recommend the 92XX series) which are very well supported by the open source,
in-kernel driver (megaraid_sas? megasas?). I don't believe the 1068e is a
wise choice for new installations and the 4i variants run as low as $180
new.

We currently run, in production, the X8DT3 with a 9240-8i card and skipped
the onboard.

Brandon

On Wed, Mar 16, 2011 at 8:19 AM, Peter Peltonen wrote:

> I have now partially solved my problem:
>
> On Wed, Mar 9, 2011 at 5:55 PM, Peter Peltonen 
> wrote:
> > I need to do a new CentOS net install on a new server having the
> > Supermicro X7DVL-3 motherboard:
>
> [...]
>
> > So I assume the controller is not supported and I need a binary driver
> > for it. For 1068e it should be:
>
> I received the driver image megasr-13.17.0421.2010-1-rhel50-u5-all.img
> from the hardware vendor and was able to use it as the driver disk for
> installation.
>
> Upgrading the kernel issue is still unresolved though:
>
> > And what happens if I get the driver installed and then the server's
> > kernel is updated? Do I need reinstall the driver somehow?
>
> After updates the system is unable to boot with the new kernel as it
> cannot find the megasr driver.
>
> What shoudl I do? Does the megasr module for the old kernel also work
> with the new kernel => do I need to copy it somewhere and create an
> initrd  image including that module? Or do I need to find an updated
> megasr module from somewhere?
>
> Best regards,
> Peter
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Watching a directory

2011-03-16 Thread R P Herrold
On Wed, 16 Mar 2011, Jason Slack-Moehrle wrote:

> Would anyone have thoughts?

don't reinvent the wheel

inotify builds and works fine on CentOS 5

-- Russ herrold
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] perl one-liner issue

2011-03-16 Thread Benjamin Franz
On 03/16/2011 01:42 PM, Joseph L. Casale wrote:
>>> $conf['nagios_base'] =
>> I'd just search for that part, above.
> Me to, and I never even got to the replacement as the search for that
> was bailing:)

The problem is trying to pass valid Perl though the bash shell . There 
is an insane amount of interaction between all the escapings involved in 
this specific pattern. The hard problem is getting bash to *not* change 
what you are passing to Perl before Perl sees it.

Use 'echo' as a stand-in for Perl and you will see what is actually 
being passed to Perl for execution (it most likely isn't what you think 
it is). Once you know you are feeding Perl the right thing, you can 
worry about getting the pattern for the substitution correct.

After enough poking and prodding you'll get something like this (after 
giving up on getting bash to not molest the ' characters before passing 
them to Perl):

's/(\$conf\[\047nagios_base\047]\s*=\s*")\/nagios\/cgi-bin";/$1stuffhere"\;/'

Is there some reason you can't use a straight Perl script instead of 
using bash to run a perl one liner?

-- 
Benjamin Franz
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] skype?

2011-03-16 Thread Paul Heinlein
On Wed, 16 Mar 2011, m.r...@5-cent.us wrote:

> ldd shows an entry to linux-gate, which I don't have installed (or 
> at least rpm tells me I don't).

linux-gate is a virtual library that lives in memory and handles the 
sysenter and sysexit instructions. It doesn't actually exist in the 
filesystem.

-- 
Paul Heinlein <> heinl...@madboa.com <> http://www.madboa.com/
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Watching a directory

2011-03-16 Thread Brian Mathis
On Wed, Mar 16, 2011 at 5:12 PM, R P Herrold  wrote:
> On Wed, 16 Mar 2011, Jason Slack-Moehrle wrote:
>
>> Would anyone have thoughts?
>
> don't reinvent the wheel
>
> inotify builds and works fine on CentOS 5
>
> -- Russ herrold

In particular, 'incron' is very cool.  I have just started using it
for a project and it does exactly what you need.  There are packages
already available in the EPEL repository, no need to build.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Apache/Active Directory authentication

2011-03-16 Thread Michael B Allen
On Mon, Mar 14, 2011 at 5:58 AM, John Hodrien  wrote:
> On Mon, 14 Mar 2011, Michael B Allen wrote:
>
>> Hi Asya,
>>
>> You must set the servicePrincipalName attribute on the service account
>> (MYSERVER$ in this case) to include all of the hostnames that will be
>> used to access the web server which in this case would be at least
>> "HTTP/myserver.server.com". One way to do this would be to use
>> setspn.exe on a Windows client but if you really have no access to the
>> Windows side as you say, you could use the Samba keytab to acquire
>> credentials for doing the necessary LDAP add operation using some tool
>> (maybe there is a Samba utility for this, I don't know) or program.
>
> That's not true, and I'm not even sure it's possible from samba (at least, I'm
> not sure it *should* be possible).

What's not true? That you can use the Samba keytab to acquire a ticket
and perform an LDAP operation on it's own Computer account? It
certainly is true. In fact Samba uses the keytab to authenticate with
and at least query AD services on a regular basis to perform normal
day-to-day operations.

But from looking at you other response I wonder if "net ads keytab ADD
HTTP" adds servicePrincipalName attribute values (I don't use Samba
like that so I don't know). If is supposed to, and the AD account does
not have them, then I agree, something is wrong and he should start
over. It could be a replication issue.

> I have a machine with an A record that matches the keytab entry ("real").  
> The PTR
> record for the IP goes back that the hostname.  There's then a CNAME record
> for the name used in reality for the web server ("friendly").
>
> A client will access:
>
> https://www.friendly/kerberised
>
> Client correctly pulls down HTTP/real@KRB-REALM, and the authentication works
> just fine.

I don't know what the official view is on going through a CNAME but I
think that is probably a dubious practice. The proper way to handle
this scenario would be to add another servicePrincipalName value for
HTTP/www.friendly and a corresponding keytab entry for
HTTP/www.friendly@KRB-REALM.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] perl one-liner issue

2011-03-16 Thread Joseph L. Casale
>The problem is trying to pass valid Perl though the bash shell . There 
>is an insane amount of interaction between all the escapings involved in 
>this specific pattern. The hard problem is getting bash to *not* change 
>what you are passing to Perl before Perl sees it.

As I have noticed:)

>After enough poking and prodding you'll get something like this (after 
>giving up on getting bash to not molest the ' characters before passing 
>them to Perl):
>
>'s/(\$conf\[\047nagios_base\047]\s*=\s*")\/nagios\/cgi-bin";/$1stuffhere"\;/'

Yup, saw some notes like this, I ended up cheating with a couple of greedy
backreferences on both sides of the simple part of the match. Not exactly
error proof, but sufficient.

>Is there some reason you can't use a straight Perl script instead of 
>using bash to run a perl one liner?

Dunno, just always seen one liners in the %install section to fixup things
not adjustable by configure statements...

Thanks!
jlc
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] perl one-liner issue

2011-03-16 Thread Jason Pyeron
> -Original Message-
> From: Benjamin Franz
> Sent: Wednesday, March 16, 2011 17:30
> To: CentOS mailing list
> Subject: Re: [CentOS] perl one-liner issue
> 
> On 03/16/2011 01:42 PM, Joseph L. Casale wrote:
> >>> $conf['nagios_base'] =
> >> I'd just search for that part, above.
> > Me to, and I never even got to the replacement as the 
> search for that 
> > was bailing:)
> 
> The problem is trying to pass valid Perl though the bash 
> shell . There is an insane amount of interaction between all 
> the escapings involved in this specific pattern. The hard 
> problem is getting bash to *not* change what you are passing 
> to Perl before Perl sees it.
> 
> Use 'echo' as a stand-in for Perl and you will see what is 
> actually being passed to Perl for execution (it most likely 
> isn't what you think it is). Once you know you are feeding 
> Perl the right thing, you can worry about getting the pattern 
> for the substitution correct.
> 
> After enough poking and prodding you'll get something like 
> this (after giving up on getting bash to not molest the ' 
> characters before passing them to Perl):


'this string isn'"'"'t escaped \n\n :) '

I got used to this a long time ago...

> 
> 's/(\$conf\[\047nagios_base\047]\s*=\s*")\/nagios\/cgi-bin";/$
1stuffhere"\;/'
> 
> Is there some reason you can't use a straight Perl script 
> instead of using bash to run a perl one liner?
> 

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-   -
- Jason Pyeron  PD Inc. http://www.pdinc.us -
- Principal Consultant  10 West 24th Street #100-
- +1 (443) 269-1555 x333Baltimore, Maryland 21218   -
-   -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Watching a directory

2011-03-16 Thread Dr. Ed Morbius
on 14:06 Wed 16 Mar, Jason Slack-Moehrle (slackmoehrle.li...@gmail.com) wrote:
> Hi All,
> 
> I am thinking about an idea, but it requires that I be able to watch several
> directories for files that are added, deleted or maybe changed.
> 
> Let start with adding files. What tools are available for me to watch a
> directory. In an example, if a file is added to a directory I want to run a
> shell script that will do some conversation on the file to produce a second
> copy.
> 
> I have the shell scripting down, I am not sure how to watch, realize change
> and kick off the script with the parameters of the directory and what was
> added.
> 
> Would anyone have thoughts?

make

-- 
Dr. Ed Morbius, Chief Scientist /|
  Robot Wrangler / Staff Psychologist| When you seek unlimited power
Krell Power Systems Unlimited|  Go to Krell!
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] skype?

2011-03-16 Thread Garry Dale
Akemi Yagi wrote:
> On Wed, Mar 16, 2011 at 1:37 PM,   wrote:

> Try the static version. Here's the CentOS wiki:
> 
> http://wiki.centos.org/HowTos/Skype

fwiw, the above mentioned wiki page helped me quickly get 
skype_static-2.1.0.81 up on CentOS 5.5 a few months ago, just in time 
for the holidays. Info on that page is good stuff. A belated thanks to 
the community for creating and maintaing that info. ;-)
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Watching a directory

2011-03-16 Thread Trutwin, Joshua
> Let start with adding files. What tools are available for me to watch a 
> directory. 
> In an example, if a file is added to a directory I want to run a shell script 
> that 
> will do some conversation on the file to produce a second copy.

I just was working on something like this today - yum search inotify - here's a 
nice intro with an example close to what I'm using:

https://github.com/rvoicilas/inotify-tools/wiki/#info (inotifywait example 1)

I used -e create -e modify -e delete instead of -e close_wait - see the man 
page for events.

Very slick so far.

Josh
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] perl one-liner issue

2011-03-16 Thread Jonathan Detert
On Wed, Mar 16, 2011 at 07:56:41PM +, Joseph L. Casale wrote:
> I am trying to deduce the one liner for an rpm I am packaging to edit a php
> configuration file from within my spec. The line I am editing looks like:
> 
> $conf['nagios_base'] = "/nagios/cgi-bin";
> 
> What are the escape requirements Perl needs from within the shell to
> search for this?
> 
> As I have seen, the syntax is a mess, any pointers would be appreciated!

Go easy on yourself, and :
a) don't try to match the quotation marks verbatim.  Instead, match them with 
simply a .
b) use parenthesis to 'remember' a pattern that you don't want to have
to specify again.

E.g. to replace the path on the right-hand-side, do this:
(i replaced it with a /; you could of course replace it with whatever
you want)

perl -i -ne 's/(^\s*\$conf\[.nagios_base.] = ).\/nagios\/cgi-bin.;/$1 \"\/\";/; 
print;' phpConfigFileName

E.g. to delete the line outright:
perl -i -ne 'print unless /^\s*\$conf\[.nagios_base.] = .\/nagios\/cgi-bin.;/;' 
phpConfigFileName

Cheers,

Jon
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] perl one-liner issue

2011-03-16 Thread Joseph L. Casale
>Go easy on yourself, and :
>a) don't try to match the quotation marks verbatim.  Instead, match them with 
>simply a .

Clever, thanks!
jlc
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Cannot %include in CentOS 5.5 kickstart

2011-03-16 Thread whitivery
whitivery  wrote:

>Patrick Lists
> wrote:
>
>>On 03/10/2011 08:14 AM, whitivery wrote:
>>> # This does not work
>>> %include /tmp/drvdisk
>>>
>>> # This works
>>> #driverdisk
>>> --source=nfs:10.0.4.157:/srv/cobbler/RHEL5.5_x86_402_409_410_DD.img
>>>
>>>
>>> %packages
>>> @base
>>> @core
>>>
>>> %pre --erroronfail
>>>
>>> echo "driverdisk
>>> --source=nfs:10.0.4.157:/srv/cobbler/RHEL5.5_x86_402_409_410_DD.img">
>>> /tmp/drvdisk
>>
>>Although lacking a good caffeine fix the only difference I notice with 
>>some examples is that they do this:
>>
>>%include /tmp/drvdisk.sh
>>.
>>.
>>.
>>%pre
>>echo "driverdisk --source=nfs:10.1.2.3:/foo/image.img" > /tmp/drvdisk.sh
>>
>>Notice the usage of ".sh" in the drvdisk.sh filename?
>
>Thanks for the idea - but it didn't make any difference.  I even did chmod
>+x on the created file.  I'm suspecting it's something specific to the
>driverdisk command, I'll play around if I get a chance and see if
>including other things works as expected - in my previous 4.4 work I never
>used a driver disk.

Today I tried including something other than driverdisk (I put the
partitioning commands in an include file), and it works fine.  So it's
something specific to the driverdisk command.

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos