Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion live/live-root/usr/bin/agama-issue-generator
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
# issues
CERT_ISSUE=/run/issue.d/50-agama-ssl-certificate.issue

if grep -q "\binst.listen_on=localhost\b" /run/agama/cmdline.d/agama.conf; then
LOCAL_ONLY=1
fi

# a helper function which generates the Agama welcome message displayed at the
# console
generate_welcome() {
Expand All @@ -44,6 +48,11 @@ generate_ssh_fingerprints() {
# a helper function which generates the Agama SSL certificate fingerprints
# displayed at the console
generate_certificate_fingerprints() {
if [ "$LOCAL_ONLY" = "1" ]; then
echo "Remote access to the Agama installer is disabled, not generating Agama SSL fingerprints"
exit 0
fi

AGAMA_CERT=/etc/agama.d/ssl/cert.pem

# delete the previous file if it is there
Expand Down Expand Up @@ -106,6 +115,11 @@ be used remotely.\\\\e{reset}\n\n" > "$DISCONNECTED_ISSUE"
# a helper function which generates the mDNS URL for accessing the Agama server
# displayed at the console
generate_avahi_url() {
if [ "$LOCAL_ONLY" = "1" ]; then
echo "Remote access to the Agama installer is disabled, skipping Avahi URL generation"
exit 0
fi

# track the name, update the issue file only if the name is changed
OLDNAME=""

Expand Down Expand Up @@ -183,7 +197,12 @@ function create_qr_codes() {
REST_ADDRESSES=("${IP4ADDR[@]:$QR_NUM:$SZ}")
else
QR_ADDRESSES=()
REST_ADDRESSES=("${ADDRESSES[@]}")
REST_ADDRESSES=()
IP6ADDR=()
# put IPv6 addresses into a separate list to display [] around them
for ADDR in "${ADDRESSES[@]}"; do
[[ "$ADDR" =~ : ]] && IP6ADDR+=("$ADDR") || REST_ADDRESSES+=("$ADDR")
done
fi

if [ -n "${REST_ADDRESSES[*]}" ]; then
Expand All @@ -194,6 +213,7 @@ function create_qr_codes() {
fi

if [ -z "${QR_ADDRESSES[*]}" ]; then
echo >> "$URL_ISSUES"
return 0
fi

Expand Down Expand Up @@ -227,6 +247,7 @@ function create_qr_codes() {

cat "$QR_RESULT" >> "$URL_ISSUES"
echo "$LABEL" >> "$URL_ISSUES"
echo >> "$URL_ISSUES"

# delete the temporary files
rm -f "$QR_TEMP" "$QR_RESULT_COPY" "$QR_RESULT"
Expand Down Expand Up @@ -276,6 +297,13 @@ build_addresses() {
# a helper function which generates the URLs for accessing the Agama server
# displayed at the console
generate_network_url() {
if [ "$LOCAL_ONLY" = "1" ]; then
echo "Remote access to the Agama installer is disabled, skipping network URL generation"
# display a warning message
printf "\\\\e{brown}Remote access to the Agama installer is disabled, it can be used only locally.\\\\e{reset}\n\n" > "$DISCONNECTED_ISSUE"
exit 0
fi

# build a message with the current URLs
build_addresses

Expand Down
7 changes: 7 additions & 0 deletions live/src/agama-installer.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Mar 24 17:21:07 UTC 2026 - Ladislav Slezák <lslezak@suse.com>

- Do not print the Agama URLs on the console when remote access
has been disabled using the "inst.listen_on=localhost" boot
parameter (related to jsc#AGM-153, gh#agama-project/agama#3269)

-------------------------------------------------------------------
Fri Mar 20 07:25:55 UTC 2026 - Josef Reidinger <jreidinger@suse.com>

Expand Down
Loading