Make it more likely we'll call ansible-poll at first boot.
If there's no internet connectivity on first boot we woudln't ansible-
poll until the crontab called it.
Instead we now run ansibleprep every time and exit if our hostname
isn't poudriere-image (i.e. if we've actually run the first ansible-
poll call).
# PROVIDE: ansibleprep
# REQUIRE: DAEMON
# BEFORE: LOGIN
-# KEYWORD: firstboot
. /etc/rc.subr
ansibleprep_start()
{
+ # Only do this until we've set the hostname, which we use as a proxy for
+ # 'initial config done, reverse ssh tunnel ready'
+ # We do do a daily poll, so worst case it'll eventually work out.
+ if [ $(hostname) != "poudriere-image" ];
+ then
+ exit 0
+ fi
+
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
# Just enough so kp can log in