Skip to content

Commit a7d30f9

Browse files
aamirrasheedclaude
andcommitted
Read ADMIN_USERNAME key from inference.conf (new key name)
Avoids the ADMIN_USER substring collision in cloud-init placeholder replacement. Backwards compat: also checks CVM_ADMIN_USER and ADMIN_USER. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 38cfa20 commit a7d30f9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

privateclaw

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ cmd_verify() {
9898
# Find admin user home
9999
ADMIN_HOME="/home/azureuser"
100100
if [ -f "$INFERENCE_CONF" ]; then
101-
CONF_USER=$(grep -E '^(CVM_ADMIN_USER|ADMIN_USER)=' "$INFERENCE_CONF" 2>/dev/null | cut -d= -f2)
101+
CONF_USER=$(grep -E '^(ADMIN_USERNAME|CVM_ADMIN_USER|ADMIN_USER)=' "$INFERENCE_CONF" 2>/dev/null | cut -d= -f2)
102102
if [ -n "$CONF_USER" ]; then
103103
ADMIN_HOME="/home/$CONF_USER"
104104
fi
@@ -247,7 +247,7 @@ cmd_assign() {
247247
# Read admin user from inference.conf
248248
ADMIN_USER="azureuser"
249249
if [ -f "$INFERENCE_CONF" ]; then
250-
CONF_USER=$(grep -E '^(CVM_ADMIN_USER|ADMIN_USER)=' "$INFERENCE_CONF" 2>/dev/null | cut -d= -f2)
250+
CONF_USER=$(grep -E '^(ADMIN_USERNAME|CVM_ADMIN_USER|ADMIN_USER)=' "$INFERENCE_CONF" 2>/dev/null | cut -d= -f2)
251251
if [ -n "$CONF_USER" ]; then
252252
ADMIN_USER="$CONF_USER"
253253
fi

0 commit comments

Comments
 (0)