/usr/lib/fai/get-config-dir-gosa is in goto-fai 3.1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | #!/bin/bash
# (c) 2007-2008 Jan-Marek Glogowski <glogow@fbihome.de>
# (c) 2008 Cajus Pollmeier <pollmeier@gonicus.de>
# (c) 2009-2010 Benoit Mortier <benoit.mortier@opensides.be>
trap '' INT
### BEGIN SUBROUTINE INFO
# Provides-Var:
# Requires-Var: $FAI $action
# Suggests-Var:
# Short-Description: get $FAI from an ldap server.
### END SUBROUTINE INFO
# Start si client
pkill gosa-si-client &> /dev/null
/usr/sbin/gosa-si-client -vvvvvvvvvv
# Wait for the si-client to get up
while [ ! -f /var/run/gosa-si/gosa-si-client.opts ]; do sleep 0.5; done
. /var/run/gosa-si/gosa-si-client.opts
. /usr/lib/goto/goto-support.lib
if [ "$action" != "softupdate" ]; then
echo "* setting hostname: $HOSTNAME"
hostname "$HOSTNAME"
fi
# If we're very slow, wait for the ldap.conf
if [ "$LDAP_AVAILABLE" ]; then
echo "* waiting for LDAP configuration"
while [ ! -f /etc/ldap/ldap.conf ]; do echo "."; sleep 1; done
fi
# Check if autosetup is needed at this point
echo "* GOto configurator started"
if ! terminal_activated $MAC; then
# Cancel softupdate on non-activated systems
if [ "softupdate" != "$action" ]; then
# wait till we get activated - need to be pushed twice here...
echo "goto-activation-start" >> $LOGDIR/fai.log
echo "* GOto waiting for activation..."
while [ ! -f /var/run/gosa-si/gosa-si-client.activated ]; do sleep 1; done
# GOsa writes the GOto entry in three steps. To continue, we check
# if XDRIVER is present.
while ! terminal_load_hardware_profile $MAC &> /dev/null; do
cat "/etc/sysconfig/GOto" | grep -v 'XDRIVER="unknown"' | grep -q 'XDRIVER' && break
sleep 5
done
# Activated!
echo "goto-activation-stop" >> $LOGDIR/fai.log
echo "* GOto system activated"
if terminal_reboot_needed $MAC; then
faireboot
while true; do sleep 1; done
fi
fi
fi
# Wait for LDAP config which may not be available yet
echo "* waiting for LDAP configuration"
while [ ! -f /etc/ldap/ldap.conf ]; do sleep 1; done
# Create configuration space
ldap2fai -v -d ${FAI} -H $HOSTNAME $MAC | tee $LOGDIR/ldap2fai.log
if [ 0 -ne $? ]; then
task error 500 1 "$(< $LOGDIR/ldap2fai.log)\n\nPress enter to reboot." 15 60
fi
# Provide /etc/sysconfig/GOto
terminal_load_hardware_profile $MAC
# vim:ts=2:sw=2:expandtab:shiftwidth=2:syntax:paste
|