#!/bin/bash# Kickstart for RHEL/CentOS 5
installurl --url=<%= repo_url %>cmdline
lang en_US.UTF-8keyboard usrootpw <%= node.root_password %>network --hostname <%= node.hostname %> --noipv6firewall --enabled --sshauthconfig --enableshadow --enablemd5timezone --utc America/Los_Angeles# Avoid having 'rhgb quiet' on the boot linebootloader --location=mbr --append="crashkernel=auto"# The following is the partition information you requested# Note that any partitions you deleted are not expressed# here so unless you clear all partitions first, this is# not guaranteed to workzerombr yesclearpart --all --initlabel# Create primary partitionspart /boot --fstype ext3 --size=512 --asprimarypart swap --fstype swap --size=1024 --recommended --maxsize=4096part pv.01 --size=1 --grow
volgroup vgroup1 pv.01logvol / --fstype ext3 --name=root --vgname=vgroup1 --size=20480logvol /tmp --fstype ext3 --name=temp --vgname=vgroup1 --size=1024 --fsoptions="nodev,nosuid"logvol /home --fstype ext3 --name=home --vgname=vgroup1 --size=10240 --fsoptions="nodev"logvol /var --fstype ext3 --name=var --vgname=vgroup1 --size=10240 --fsoptions="nodev"logvol /var/log --fstype ext3 --name=varlog --vgname=vgroup1 --size=2048 --fsoptions="nodev,noexec,nosuid"logvol /var/log/audit --fstype ext3 --name=audit --vgname=vgroup1 --size=1024 --fsoptions="nodev,noexec,nosuid"
# reboot automaticallyreboot
# following is MINIMAL https://partner-bugzilla.redhat.com/show_bug.cgi?id=593309%packages --nobase@core@basenanoopenssh-clients
%post --log=/var/log/razor.logecho "Kickstart post"
curl -s -o /root/razor_postinstall.sh <%= file_url("post_install") %>
# Run razor_postinstall.sh on next boot via rc.localif [ ! -f /etc/rc.d/rc.local ]; then # On systems using systemd /etc/rc.d/rc.local does not exist at all # though systemd is set up to run the file if it exists touch /etc/rc.d/rc.localfichmod a+x /etc/rc.d/rc.local
echo bash /root/razor_postinstall.sh >> /etc/rc.d/rc.localchmod a+x /root/razor_postinstall.sh
curl -s <%= stage_done_url("kickstart") %>echo "<%= stage_done_url("kickstart") %>"############sleep 10%end
#!/bin/bash
exec >> /var/log/razor.log 2>&1
echo "Starting post_install"
# Wait for network to come up when using NetworkManager.if service NetworkManager status >/dev/null 2>&1 && type -P nm-online; then nm-online -q --timeout=10 || nm-online -q -x --timeout=30 [ "$?" -eq 0 ] || exit 1fi
<%= render_template("set_hostname") %>
<%= render_template("store_ip") %>
# @todo lutter 2013-09-12: we should register the system with RHN; be# careful though, since this file is also used by the CentOS installer, for# which there is no RHN registration
<%= render_template("os_complete") %>
# We are donecurl -s <%= stage_done_url("finished") %>
chmod: cannot access '/root/razor_postinstall.sh': no such file or directory
So I checked /root/anaconda_ks.cfg and saw where it tries to do a curl from (in my case) http://razor:8080/...
Due to the way I had my DHCP server configured, /etc/resolv.conf had bad search stuff in it due to my having misconfigured the hostname in my centos policy JSON. I had the hostname as "hostname": "host${id}.somedomain" which caused "search somedomain" to end up in resolv.conf. Yet, my Razor host was using a simple non-domain hostname of "razor" which was getting converted to "razor.somedomain" and therefore not resolving. (I'm doing all this stuff in an isolated NATed environment and am using simple hostnames.)
Kickstart post
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
# ...
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
Ugh, already fixed in this commit:
https://github.com/puppetlabs/razor-server/commit/669995285deae9b4e0b8457130f0b72af5a41254
I should just be working from the git repo instead of the razor-server rpm.
--
You received this message because you are subscribed to the Google Groups "puppet-razor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-razor...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-razor.
For more options, visit https://groups.google.com/d/optout.
I know this is an older ticket, but in case it's useful to anyone else, I worked around this issue by fully specifying stage_done_url and file_url("post_install") - interestingly, some of the other file_urls are file (I think some of the log urls aren't working, but I haven't tracked them down).