Hi,
This is an experimental patch to allow users to specify profilename for
client systems during registration process.
There is a case that client systems are registered as "unknown" name and
this patch can eliminate that, I think.
I've not tested it with the current spacewalk but it looks fine at least
in satellite-5.2.
Thanks,
Satoru SATOH
spacewalk/certs-tools/rhn_bootstrap_strings.py | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/spacewalk/certs-tools/rhn_bootstrap_strings.py
b/spacewalk/certs-tools/rhn_bootstrap_strings.py
index d1676fa..0f505a2 100644
--- a/spacewalk/certs-tools/rhn_bootstrap_strings.py
+++ b/spacewalk/certs-tools/rhn_bootstrap_strings.py
@@ -116,6 +116,14 @@ ALLOW_REMOTE_COMMANDS=%s
FULLY_UPDATE_THIS_BOX=%s
+# Set if you want to specify profilename for client systems.
+# NOTE: Make sure it's set correctly if any external command is used.
+#
+# ex. PROFILENAME="foo.example.com" # For specific clinet system
+# PROFILENAME=`hostname -s` # Short hostname
+# PROFILENAME=`hostname -f` # FQDN
+PROFILENAME="" # Empty by default to let it be set automatically.
+
#
# -----------------------------------------------------------------------------
# DO NOT EDIT BEYOND THIS POINT -----------------------------------------------
@@ -348,7 +356,12 @@ if [ $REGISTER_THIS_BOX -eq 1 ] ; then
[ -f /etc/sysconfig/rhn/allowed-actions/configfiles/all ] ||
files="$files /etc/sysconfig/rhn/allowed-actions/configfiles/all"
[ -n "$files" ] && touch $files
fi
- /usr/sbin/rhnreg_ks --force --activationkey "$ACTIVATION_KEYS"
+ if [ -z "$PROFILENAME" ] ; then
+ profilename_opt=""
+ else
+ profilename_opt="--profilename=$PROFILENAME"
+ fi
+ /usr/sbin/rhnreg_ks --force --activationkey "$ACTIVATION_KEYS"
$profilename_opt
[ -n "$files" ] && rm -f $files
[ -n "$directories" ] && rmdir $(echo $directories | rev)
echo
--
1.6.2.2
_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel