Time well spent
05 May 2010Just spent two hours staring at this Python regex:
method_re = re.compile('(?P<urlcmd>\s*url\s.*)|(?P<nfscmd>\s*nfs\s.*)')
and trying to figure out why it wouldn't match this line:
install url --url http://cobbler.example.org/cobbler/ks_mirror/CentOS-5.4/os/x86_64
After much research, I can report two things:
In python, the
match()
method of a regular expression object matches from the beginning of the line. If you think in Perl, like I do, it's like if they prepended a^
to the beginning of the regex.(?P<urlcmd>
puts the match in the variableurlcmd
. That wasn't a problem, I just think it's neat (though obscure).A kickstart file, which the line is taken from, is meant to have the
install
line be separate from the method (in this case,url
). I did not know that.
And now to read more of Dr. Zhivago.
Update: by way of explanation, I was trying to use koan and Cobbler to install a new qemu instance like so:
/usr/bin/koan --nogfx --server=cobbler.example.com --virt --system=virtserver-01.example.com
and was getting two errors:
warning: kickstart found but no install_tree found
Cannot find install source in kickstart file, aborting.
The problem turned out to be that my kickstart file had this line:
install url --url http://cobbler.example.org/cobbler/ks_mirror/CentOS-5.4/os/x86_64
which should have been two lines:
install
url --url http://cobbler.example.org/cobbler/ks_mirror/CentOS-5.4/os/x86_64
2 Comments
From: cristian
31 December 2009 21:36:08
hi, you can also chattr +i the /dev/null file and if you forget to run mysql client as user will be no problem :)
regards
From: Matt Simmons
1 January 2010 20:42:56
@Cristian
If I make /dev/null immutable, where will I send my naughty user accounts?
Add a comment:
Name and email required; email is not displayed.
Related Posts
QRP weekend 08 Oct 2018
Open Source Cubesat Workshop 2018 03 Oct 2018
mpd crash? try removing files in /var/lib/mpd/ 11 Aug 2018