AW: cfengine error during fai-based install

2006-06-08 Thread Martin Muller
Hallo Michael!

Yes, im sure squid is successful installed include running the postinst
script.
The Part which I did not posted works successful with cfengine. 
I replace strings in the squid.conf with ReplaceAll. Like:
ReplaceAll ^\# http\_port 3128 With http_port 8080

In the last days i try to setup cgengine2 to resolve the problem. but
cfengine2 wont not successful install with fai or after the first
reboot. i use this to install cfengine correctly, but not beautiful but
works:
apt-get install cfengine2
agt-get remove cfengine2
apt-get install cfengine2 - now dpkg starts to configure cfengine !

Thanks

Martin

-Ursprungliche Nachricht-
Von: Michael Tautschnig [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 7. Juni 2006 21:44
An: Martin Muller
Cc: linux-fai@rrz.uni-koeln.de
Betreff: Re: cfengine error during fai-based install


Hi Martin,

AFAIK nobody has replied to your post to date - sorry...

 i a newbie in debian, fai and cfengine (formely suse, 
without wonderful fai and cfengine) and need now some hint to 
resolve this problem.
 
[...]
 
 Whats wrong ???
 
 Install anyone cfengine2 with fai? the pre or post 
config-script gets an sed-editor error and the debconf 
settings will not correct apply.


If got no idea about cfengine2, but it should AFAIK work. 
However, personally I'd suggest
you simply use sed/perl instead of cfengine...

But back to your question: Are you sure, squid has been 
installed and configured
completely before your cfengine script is run for the first 
time? Note, that
/etc/squid/squid.conf is copied by squid's postinst script and 
thus it might
have been completely missing upon the first attempt to run cfengine!?

Just a wild guess,
Michael





Re: cfengine error during fai-based install

2006-06-08 Thread Michael Tautschnig
 Hallo Michael!
 
 Yes, im sure squid is successful installed include running the postinst
 script.
 The Part which I did not posted works successful with cfengine. 
 I replace strings in the squid.conf with ReplaceAll. Like:
 ReplaceAll ^\# http\_port 3128 With http_port 8080

What about some script that runs before your first cfengine attempt and backups
/etc/squid/squid.conf somewhere such that you can later try to run cfengine
manually on the backuped version?

 In the last days i try to setup cgengine2 to resolve the problem. but
 cfengine2 wont not successful install with fai or after the first
 reboot. i use this to install cfengine correctly, but not beautiful but
 works:
 apt-get install cfengine2
 agt-get remove cfengine2
 apt-get install cfengine2 - now dpkg starts to configure cfengine !
 

Which version of cfengine2 are you trying to install (stable/testing/unstable)?
What is the exact error message?

Regards,
Michael



signature.asc
Description: Digital signature


Re: cfengine error during fai-based install

2006-06-07 Thread Michael Tautschnig
Hi Martin,

AFAIK nobody has replied to your post to date - sorry...

 i a newbie in debian, fai and cfengine (formely suse, without wonderful fai 
 and cfengine) and need now some hint to resolve this problem.
 
[...]
 
 Whats wrong ???
 
 Install anyone cfengine2 with fai? the pre or post config-script gets an 
 sed-editor error and the debconf settings will not correct apply.


If got no idea about cfengine2, but it should AFAIK work. However, personally 
I'd suggest
you simply use sed/perl instead of cfengine...

But back to your question: Are you sure, squid has been installed and configured
completely before your cfengine script is run for the first time? Note, that
/etc/squid/squid.conf is copied by squid's postinst script and thus it might
have been completely missing upon the first attempt to run cfengine!?

Just a wild guess,
Michael



signature.asc
Description: Digital signature


cfengine error during fai-based install

2006-06-02 Thread Martin Müller
Hi list

i a newbie in debian, fai and cfengine (formely suse, without wonderful fai and 
cfengine) and need now some hint to resolve this problem.

For setup my squid i use this cfengine config:

BeginGroupIfNoLineMatching ^acl proxy\_lan src 10.150.1.247
 LocateLineMatching ^http\_access allow localhost
 InsertLine acl proxy_lan src 10.150.1.247
 InsertLine http_access allow proxy_lan
EndGroup


During the install with fai, cfengine log this:

Edit: Search for ^acl proxy\_lan src 10.150.1.247 failed. Current line still 3
(Begin Group - no line matching ^acl proxy\_lan src 10.150.1.247)
Edit: Search for ^http\_access allow localhost failed. Current line still 3
cfengine: LocateLineMatchingRegexp failed in /tmp/target/etc/squid/squid.conf, 
aborting editing
cfengine: End editing /tmp/target/etc/squid/squid.conf
.
cfengine: Edited file /tmp/target/etc/squid/squid.conf
SQUID/140-squid  OK.


But this is the same config when i start cfengine before the reboot:

demo:/etc/cfengine# cfengine -v -f /fai/scripts/SQUID/140-squid


Edit: Search for ^acl proxy\_lan src 10.150.1.247 failed. Current line still 1
(Begin Group - no line matching ^acl proxy\_lan src 10.150.1.247)
Edit: Search ended at line 1874
Edit: (Found http_access allow localhost)
Inserting acl proxy_lan src 10.150.1.247
Inserting http_access allow proxy_lan
(End Group)
cfengine: End editing /tmp/target/etc/squid/squid.conf
.
cfengine: Edited file /tmp/target/etc/squid/squid.conf

Whats wrong ???

Install anyone cfengine2 with fai? the pre or post config-script gets an 
sed-editor error and the debconf settings will not correct apply.

Thanks

Martin



Re: cfengine and variable

2006-03-29 Thread Cedric BRINER
 hello,
 
 I was knocking my head against a wall with cfengine script in general.
 
 when I realize that this cfengine script is not working 
#! /usr/bin/cfengine

control:
   OutputPrefix = (cfengine)
   actionsequence = ( files directories editfiles )
   EditFileSize = ( 3 )

files:
   any::

directories:
   any::
   /root/qq mode=0700 owner=0 group=0
   ${target}/root/ww mode=0700 owner=0 group=0
 
 if you do not an export target='' before.
 
 not workunset target=''; /usr/sbin/fai softupdate
 workexport target=''; /usr/sbin/fai softupdate 
 
 
 does some of you has already experiment such situation ?
 
 Ced.

Sorry I've forgot to say that both of them (with/without target setted) the
cfengine script doesn't work when launched through /usr/sbin/fai softupdate




-- 

Cedric BRINER
Geneva - Switzerland


Re: cfengine and variable

2006-03-29 Thread Cedric BRINER
  
  directories:
 any::
 /root/qq mode=0700 owner=0 group=0
 ${target}/root/ww mode=0700 owner=0 group=0
   
   if you do not an export target='' before.
   
   not workunset target=''; /usr/sbin/fai softupdate
   workexport target=''; /usr/sbin/fai softupdate 
   
   
   does some of you has already experiment such situation ?
   
   Ced.
  
  Sorry I've forgot to say that both of them (with/without target setted) the
  cfengine script doesn't work when launched through /usr/sbin/fai softupdate
  
 
 This is probably the same problem as reported here:
 
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=310746
 
 Maybe cfengine2 solves this issue!?
not maybe it is !!!

thank you

Ced.
P.-S. I've learned that the bugreport can also give information on how to solve 
the bug


 Regards,
 Michael




-- 

Cedric BRINER
Geneva - Switzerland


Re: fai 2.8.4 / cfengine scripts segfaults

2005-06-20 Thread Steffen Grunewald
On Sun, Jun 19, 2005 at 11:31:16PM +0200, Michael Tautschnig wrote:
 [...]
  
   Are you by chance using the version from the version from the testing
   distribution (1.6.5-2)? As I got the errors too, but only on some of my 
   hosts, I
   tried the version from stable (1.6.5-1), and this solved the problem for 
   me!
  
  What first confused me was that packages.debian.org still lists 1.6.5-1
  for stable, and 1.6.5-2 for testing - which isn't true (I installed a pure
  sarge system, and got 1.6.5-2 during the fai run. Had to manually downgrade
  to 1.6.5-1 since fai installs would fail with 1.6.5-2 --- so the problem
  isn't limited to softupgrades :-((( )
 
 I'm sorry, but I think something has gone wrong at your site -- I'm running
 Debian/Sarge systems and they do not have 1.6.5-2, but instead stayed at
 1.6.5-1. Please double-check your sources.list or the contents of your 
 logfiles,
 where 1.6.5-2 got installed!

Hmmm. I'm using an intermediate debmirror for those tasks. 
On my desktop machine (which is still wasting bandwidth by querying 
ftp.fu-berlin.de), 1.6.5-1 would be shown by apt-cache showpkg cfengine, 
but the machines using the miror would report
 
1.6.5-2(/var/lib/apt/lists/faiserv1_i_debian_dists_sarge_main_binary-i386_Packages)(/var/lib/dpkg/status)

This is somewhat strange. The mirror synchronizes with ftp2.de.debian.org,
and (of course) keeps not only sarge but testing and unstable as well.

Looking into the mirror's repository I find

phobos:/data/debian/mirror-i386/debian/dists/sarge/main/binary-i386# grep 
cfengine Packages
Package: cfengine
Suggests: cfengine-doc
Filename: pool/main/c/cfengine/cfengine_1.6.5-2_i386.deb

This is puzzling... looking deeper into it:

phobos:/data/debian/mirror-i386/debian# grep /cfengine_1 */*/*/*/Packages
dists/etch/main/binary-i386/Packages:Filename: 
pool/main/c/cfengine/cfengine_1.6.5-2_i386.deb
dists/sarge/main/binary-i386/Packages:Filename: 
pool/main/c/cfengine/cfengine_1.6.5-2_i386.deb
dists/sid/main/binary-i386/Packages:Filename: 
pool/main/c/cfengine/cfengine_1.6.5-2_i386.deb
dists/stable/main/binary-i386/Packages:Filename: 
pool/main/c/cfengine/cfengine_1.6.5-1_i386.deb
dists/testing/main/binary-i386/Packages:Filename: 
pool/main/c/cfengine/cfengine_1.6.5-2_i386.deb
dists/unstable/main/binary-i386/Packages:Filename: 
pool/main/c/cfengine/cfengine_1.6.5-2_i386.deb

Huh? Why does stable show -1, while sarge lists -2?

Have to investigate. 
Looks like I invited a lot of trouble - I guess this wouldn't be the only 
problem :-(((

Steffen

-- 
Steffen Grunewald * MPI fuer Gravitationsphysik (Albert-Einstein-Institut)
SciencePark Golm, Am Mühlenberg 1, D-14476 Potsdam * http://www.aei.mpg.de
* e-mail: steffen.grunewald(*)aei.mpg.de * +49-331-567-{fon:7233,fax:7298}
No Word/PPT mails - http://www.gnu.org/philosophy/no-word-attachments.html



Re: fai 2.8.4 / cfengine scripts segfaults

2005-06-19 Thread Steffen Grunewald
On Sat, Jun 11, 2005 at 01:07:45PM +0200, Michael Tautschnig wrote:
  Hi,
  
  during my latest softupdate I got an error processing my cfengine scripts. 
  The
  log states:
  
  /usr/bin/fai-do-scripts: line 173: 23726 Segmentation fault  ./$file 
  --no-lock -v -f $file -D${cfclasses} $LOGDIR/cfengine.log 21
  
  Removing the --no-lock option from fai-do-scripts let the softupdate run
  without any errors.
  
  Is this a bug, or am I doing something wrong?
  
  fai: 2.8.4
  cfengine: 1.6.5

I ran into this yesterday when I had to install an emergency replacement
for a failed server. Thanks to FAI this would only take 20 minutes, but this
time I got lots of errors during the config part.

 Are you by chance using the version from the version from the testing
 distribution (1.6.5-2)? As I got the errors too, but only on some of my 
 hosts, I
 tried the version from stable (1.6.5-1), and this solved the problem for me!

What first confused me was that packages.debian.org still lists 1.6.5-1
for stable, and 1.6.5-2 for testing - which isn't true (I installed a pure
sarge system, and got 1.6.5-2 during the fai run. Had to manually downgrade
to 1.6.5-1 since fai installs would fail with 1.6.5-2 --- so the problem
isn't limited to softupgrades :-((( )

Note that 1.6.5-[12] have been submitted two years apart...

Steffen

 If it solves the problem for you too, we should file a bug report against
 cfengine.

That's probably the way to go. I will look in the BTS whether there's
something to add...

Cheers,
 Steffen



Re: fai 2.8.4 / cfengine scripts segfaults

2005-06-19 Thread Michael Tautschnig
[...]
 
  Are you by chance using the version from the version from the testing
  distribution (1.6.5-2)? As I got the errors too, but only on some of my 
  hosts, I
  tried the version from stable (1.6.5-1), and this solved the problem for me!
 
 What first confused me was that packages.debian.org still lists 1.6.5-1
 for stable, and 1.6.5-2 for testing - which isn't true (I installed a pure
 sarge system, and got 1.6.5-2 during the fai run. Had to manually downgrade
 to 1.6.5-1 since fai installs would fail with 1.6.5-2 --- so the problem
 isn't limited to softupgrades :-((( )

I'm sorry, but I think something has gone wrong at your site -- I'm running
Debian/Sarge systems and they do not have 1.6.5-2, but instead stayed at
1.6.5-1. Please double-check your sources.list or the contents of your logfiles,
where 1.6.5-2 got installed!

 
 Note that 1.6.5-[12] have been submitted two years apart...
 
 Steffen
 
  If it solves the problem for you too, we should file a bug report against
  cfengine.
 
 That's probably the way to go. I will look in the BTS whether there's
 something to add...

I've already submitted the bug report, but no response so far...

Best regards,
Michael


Re: fai 2.8.4 / cfengine scripts segfaults

2005-06-11 Thread Michael Tautschnig
 Hi,
 
 during my latest softupdate I got an error processing my cfengine scripts. The
 log states:
 
 /usr/bin/fai-do-scripts: line 173: 23726 Segmentation fault  ./$file 
 --no-lock -v -f $file -D${cfclasses} $LOGDIR/cfengine.log 21
 
 Removing the --no-lock option from fai-do-scripts let the softupdate run
 without any errors.
 
 Is this a bug, or am I doing something wrong?
 
 fai: 2.8.4
 cfengine: 1.6.5


Are you by chance using the version from the version from the testing
distribution (1.6.5-2)? As I got the errors too, but only on some of my hosts, I
tried the version from stable (1.6.5-1), and this solved the problem for me!

If it solves the problem for you too, we should file a bug report against
cfengine.

Regards,
Michael


Re: fai 2.8.4 / cfengine scripts segfaults

2005-06-11 Thread Andreas Jobs
On Sat, Jun 11, 2005 at 01:07:45PM +0200, Michael Tautschnig wrote:
  during my latest softupdate I got an error processing my cfengine scripts. 
  The
  log states:
  
  /usr/bin/fai-do-scripts: line 173: 23726 Segmentation fault  ./$file 
  --no-lock -v -f $file -D${cfclasses} $LOGDIR/cfengine.log 21
  
  Removing the --no-lock option from fai-do-scripts let the softupdate run
  without any errors.
  
  Is this a bug, or am I doing something wrong?
  
  fai: 2.8.4
  cfengine: 1.6.5
 
 
 Are you by chance using the version from the version from the testing
 distribution (1.6.5-2)? As I got the errors too, but only on some of my 
 hosts, I
 tried the version from stable (1.6.5-1), and this solved the problem for me!
 
 If it solves the problem for you too, we should file a bug report against
 cfengine.

It does. softupdate runs well with cfengine 1.6.5-1. We should file a bug
report against cfengine. Bug #311276 looks similar.

Regards,
Andreas

-- 
! Andreas Jobs Network Operating Center !
!  Ruhr-Universitaet Bochum !
! The only way to clean a compromised system is to flatten and rebuild. !


pgpBYz4s0ihRQ.pgp
Description: PGP signature


Re: fai 2.8.4 / cfengine scripts segfaults

2005-06-11 Thread Michael Tautschnig
 On Sat, Jun 11, 2005 at 01:07:45PM +0200, Michael Tautschnig wrote:
   during my latest softupdate I got an error processing my cfengine 
   scripts. The
   log states:
   
   /usr/bin/fai-do-scripts: line 173: 23726 Segmentation fault  ./$file 
   --no-lock -v -f $file -D${cfclasses} $LOGDIR/cfengine.log 21
   
   Removing the --no-lock option from fai-do-scripts let the softupdate run
   without any errors.
   
   Is this a bug, or am I doing something wrong?
   
   fai: 2.8.4
   cfengine: 1.6.5
  
  
  Are you by chance using the version from the version from the testing
  distribution (1.6.5-2)? As I got the errors too, but only on some of my 
  hosts, I
  tried the version from stable (1.6.5-1), and this solved the problem for me!
  
  If it solves the problem for you too, we should file a bug report against
  cfengine.
 
 It does. softupdate runs well with cfengine 1.6.5-1. We should file a bug
 report against cfengine. Bug #311276 looks similar.


Ok, I will do so. I'd expect a change of the (Debian) revision not to break so
many things, but judging from #311276 not only one thing is broken...

Regards,
Michael



fai 2.8.4 / cfengine scripts segfaults

2005-06-10 Thread Andreas Jobs
Hi,

during my latest softupdate I got an error processing my cfengine scripts. The
log states:

/usr/bin/fai-do-scripts: line 173: 23726 Segmentation fault  ./$file 
--no-lock -v -f $file -D${cfclasses} $LOGDIR/cfengine.log 21

Removing the --no-lock option from fai-do-scripts let the softupdate run
without any errors.

Is this a bug, or am I doing something wrong?

fai: 2.8.4
cfengine: 1.6.5


Andreas

-- 
! Andreas Jobs Network Operating Center !
!  Ruhr-Universitaet Bochum !
! The only way to clean a compromised system is to flatten and rebuild. !


pgpRx70ppLWSk.pgp
Description: PGP signature


cfengine problem

2005-06-02 Thread Haber, Michael
Hi,
I seem to have a problem with cfengine scripts. 

In /tmp/fai/error.log  I get an error with FAIBASE/40-Misc. I copied all the 
scripts from the exapmles/simple folder and I'm still getting the error:
cfengine.log:FAIBASE/40-misc  FAILED  with exit code 139
fai.log:FAIBASE/40-misc  FAILED  with exit code 139
status.log:FAIBASE/40-misc  FAILED  with exit code 139

On an installed machine that has rebooted running the 40-misc script again 
produces the error:
test01: (CFINPUTS is set to nothing)
test01: Can't open file cfengine.conf

Any ideas?
I'm using fai 2.8.4 and fai-kernels 1.9.1, booting from a boot-floppy with 
static ip.

thanks
Mike Haber

This email is intended solely for the addressee.  It may contain private and 
confidential information.  If you are not the intended addressee, please take 
no action based on it nor show a copy to anyone.  In this case, please reply to 
this email to highlight the error.  Opinions and information in this email that 
do not relate to the official business of Nottingham Trent University shall be 
understood as neither given nor endorsed by the University.
Nottingham Trent University has taken steps to ensure that this email and any 
attachments are virus-free, but we do advise that the recipient should check 
that the email and its attachments are actually virus free.  This is in keeping 
with good computing practice.




fai, softupdate and cfengine scripts

2005-05-23 Thread Andreas Jobs
Hi,

if you use fai softupdate, having cfengine scripts containing something like

files:
   any::
${target}/etc/cron.daily/calamaris mode=0600 act=fixall

you will find your / chmod 0600.

The problem: ${target) will be replaced by / during softupdate and cfengine
seems to have problems with files like //etc/cron.daily/calamaris. The cfengine
log states:

Checking file(s) in //etc/cron.daily/calamaris
cfengine: / had permission 755, changed it to 700

The solution comes as a patch:

--- fai.orig2005-05-23 13:58:23.0 +0200
+++ fai 2005-05-23 09:16:01.0 +0200
@@ -98,12 +98,12 @@
 DEBIAN_FRONTEND=noninteractive
 # local disks are mounted to $FAI_ROOT
 if [ -z $FAI_ROOT ] ; then
-  [ $DO_INIT_TASKS -eq 1 ]  FAI_ROOT=/tmp/target || FAI_ROOT=/
+  [ $DO_INIT_TASKS -eq 1 ]  FAI_ROOT=/tmp/target || FAI_ROOT=/.
 fi
 # executed command in the environment of the new system
 ROOTCMD=chroot $FAI_ROOT
 # no chroot needed
-[ $FAI_ROOT = '/' ]  ROOTCMD=
+[ $FAI_ROOT = '/.' ]  ROOTCMD=

 # Solaris has already a writable /tmp directory
 [ $oclass = LINUX -a $DO_INIT_TASKS -eq 1 ]  create_ramdisk


After this patch, cfeninge is happy.

Regards,
Andreas

-- 
! Andreas Jobs Network Operating Center !
!  Ruhr-Universitaet Bochum !
! The only way to clean a compromised system is to flatten and rebuild. !


pgpX9NBK966ws.pgp
Description: PGP signature


cfengine

2005-03-05 Thread Rudy Gevaert
Hello,

After installing a computer with FAI I see that cfengine is also
installed.

I want now to use cfengine.  I gather I can copy over the cfengine
config files and everything will work?  Or are there some build in
functions in FAI?

Thanks in advance,

Rudy



Re: cfengine

2005-03-05 Thread Henning Sprang
 Hello,
 
 After installing a computer with FAI I see that cfengine is also
 installed.
 
 I want now to use cfengine.  I gather I can copy over the cfengine
 config files and everything will work?  Or are there some build in
 functions in FAI?

you can look at the script file
/usr/share/doc/fai/examples/simple/scripts/DEFAULT/S20 for example.

And, sure, the cfengine documentation which is quite verbose, be sure not to
get lost :)

Henning


Re: cfengine

2005-03-05 Thread Rudy Gevaert
Hi,

On Saturday 05 March 2005 23:36, you wrote:
  Hello,
 
  After installing a computer with FAI I see that cfengine is also
  installed.
 
  I want now to use cfengine.  I gather I can copy over the cfengine
  config files and everything will work?  Or are there some build in
  functions in FAI?

 you can look at the script file
 /usr/share/doc/fai/examples/simple/scripts/DEFAULT/S20 for example.

But, if I'm correct these scripts only get executed when installed.
They aren't run periodically, right?


 And, sure, the cfengine documentation which is quite verbose, be sure not
 to get lost :)

Thanks, although it's hard not to get lost ;)

Rudy



Re: fai-setup, woody cfengine

2004-06-24 Thread Andre Luis Lopes
Hi Vincent,
Vincent Kraeutler wrote:
snip
Automatically converting /etc/network/interfaces succeeded.
Old interfaces file saved as interfaces.dpkg-old.
hostname: Host name lookup failure
Creating base.tgz
Upgrading /usr/lib/fai/nfsroot
Adding additional packages to /usr/lib/fai/nfsroot:
portmap dhcp-client file rdate cfengine bootpc wget rsh-client less dump
ext2resize strace hdparm parted dnsutils grub ntpdate psmisc 
dosfstools sysutils dialog libdetect0 discover mdetect read-edid kudzu hwtools
E: Package cfengine has no installation candidate
/snip
  That's what I got from my woody fai-server :
fai-server:~# apt-cache policy cfengine
cfengine:
  Installed: (none)
  Candidate: 1.6.3-9
  Version Table:
 1.6.3-9 0
500 http://192.168.20.19 woody/non-US/main Packages
fai-server:~#
   192.168.20.19 is my woody FAI server, which has a complete woody 
mirror I built using debmirror. I remember having problems like this one 
you are facing now because I forgot to mirror the non-US archive, where 
cfengine is located.

   Try mirroring non-US also in order to fix the problem. I used the 
following line in my FAI server's sources.list while building the mirror :

deb http://non-us.debian.org/debian-non-US woody/non-US main non-free 
contrib

  This solved my problem, YMMV.
   Regards,
--
André Luís Lopes
[EMAIL PROTECTED]


scripts, cfengine vs. bash

2002-05-03 Thread Bruce Edge

Is there an accepted mechanism by which one can have both a bash script
and a cfengine script for the same class.
Say have ./scripts/CLASSXX.sh and ./scripts/CLASSXX ?

Thanks, Bruce.






Re: scripts, cfengine vs. bash

2002-05-03 Thread Thomas Lange

 On 03 May 2002 09:41:07 -0700, Bruce Edge [EMAIL PROTECTED] said:

 Is there an accepted mechanism by which one can have both a bash
 script and a cfengine script for the same class.  Say have
 ./scripts/CLASSXX.sh and ./scripts/CLASSXX ?

Yes. If scripts/CLASSXX is a directory, all scripts
(bash,cfengine,perl,...) in this directory matching S[0-9]* are
executed in numeric order. See templates/scripts/NETWORK/ for an
example.

-- 
Gruss Thomas