Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package jeos-firstboot for openSUSE:Factory checked in at 2022-04-16 00:13:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/jeos-firstboot (Old) and /work/SRC/openSUSE:Factory/.jeos-firstboot.new.1941 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "jeos-firstboot" Sat Apr 16 00:13:13 2022 rev:44 rq:970149 version:1.2.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/jeos-firstboot/jeos-firstboot.changes 2022-03-18 16:41:44.837164620 +0100 +++ /work/SRC/openSUSE:Factory/.jeos-firstboot.new.1941/jeos-firstboot.changes 2022-04-16 00:13:30.533589787 +0200 @@ -1,0 +2,14 @@ +Thu Apr 14 11:31:37 UTC 2022 - Fabian Vogt <fv...@suse.com> + +- Update to version 1.2.0: + * Make use of SPDX identifiers + * Read dialog output into a variable directly + * Drop broken error handling for dialog + * Fix dialog asking about wicked network reconfiguration + * Start nmtui in jeos-firstboot if no active connection could be detected + * Load network modules dynamically + * Only list applicable modules in jeos-config + * Convert network configuration to a module + * Fix size of the "No root password set" dialog + +------------------------------------------------------------------- Old: ---- jeos-firstboot-1.1.1.1.obscpio New: ---- jeos-firstboot-1.2.0.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ jeos-firstboot.spec ++++++ --- /var/tmp/diff_new_pack.2taP9h/_old 2022-04-16 00:13:31.037590461 +0200 +++ /var/tmp/diff_new_pack.2taP9h/_new 2022-04-16 00:13:31.045590471 +0200 @@ -17,7 +17,7 @@ Name: jeos-firstboot -Version: 1.1.1.1 +Version: 1.2.0.0 Release: 0 Summary: Simple text based JeOS first boot wizard License: MIT @@ -76,8 +76,12 @@ %{_unitdir}/jeos-firstboot-snapshot.service %dir %{_datadir}/defaults/ %{_datadir}/defaults/jeos-firstboot.conf -%dir %{_datadir}/jeos-firstboot -%dir %{_datadir}/jeos-firstboot/modules +%dir %{_datadir}/jeos-firstboot/ +%dir %{_datadir}/jeos-firstboot/modules/ +%{_datadir}/jeos-firstboot/modules/network +%dir %{_datadir}/jeos-firstboot/modules/network-modules/ +%{_datadir}/jeos-firstboot/modules/network-modules/NetworkManager +%{_datadir}/jeos-firstboot/modules/network-modules/wicked %{_sbindir}/jeos-config %{_sbindir}/jeos-firstboot %{_sbindir}/jeos-firstboot-snapshot ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.2taP9h/_old 2022-04-16 00:13:31.089590530 +0200 +++ /var/tmp/diff_new_pack.2taP9h/_new 2022-04-16 00:13:31.093590535 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/jeos-firstboot.git</param> - <param name="changesrevision">e0ae3fee933953e5f6c2c52fff95ac253ba8e315</param></service></servicedata> + <param name="changesrevision">ae0d7193f1956e4d9461ae25629dbcf26ed7f47a</param></service></servicedata> (No newline at EOF) ++++++ jeos-firstboot-1.1.1.1.obscpio -> jeos-firstboot-1.2.0.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/LICENSE new/jeos-firstboot-1.2.0.0/LICENSE --- old/jeos-firstboot-1.1.1.1/LICENSE 2022-03-16 15:55:07.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/LICENSE 2022-04-13 17:54:32.000000000 +0200 @@ -1,4 +1,4 @@ -Copyright (c) 2015-2016 SUSE LLC +Copyright (c) 2015-2022 SUSE LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/lib/systemd/system/jeos-firstboot-snapshot.service new/jeos-firstboot-1.2.0.0/files/usr/lib/systemd/system/jeos-firstboot-snapshot.service --- old/jeos-firstboot-1.1.1.1/files/usr/lib/systemd/system/jeos-firstboot-snapshot.service 2022-03-16 15:55:07.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/lib/systemd/system/jeos-firstboot-snapshot.service 2022-04-13 17:54:32.000000000 +0200 @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC + [Unit] Description=SUSE JeOS First Boot Wizard - create system snapshot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/lib/systemd/system/jeos-firstboot.service new/jeos-firstboot-1.2.0.0/files/usr/lib/systemd/system/jeos-firstboot.service --- old/jeos-firstboot-1.1.1.1/files/usr/lib/systemd/system/jeos-firstboot.service 2022-03-16 15:55:07.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/lib/systemd/system/jeos-firstboot.service 2022-04-13 17:54:32.000000000 +0200 @@ -1,9 +1,5 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC [Unit] Description=SUSE JeOS First Boot Wizard @@ -16,8 +12,11 @@ ConditionPathExists=/var/lib/YaST2/reconfig_system OnFailure=poweroff.target -# jeos-firstboot starts before network and login though -Before=network.service systemd-user-sessions.service +# jeos-firstboot starts before wicked and login though. +# It writes wicked configuration manually +Before=wicked.service systemd-user-sessions.service +# For NM it uses nmcli, so NM needs to be running +After=NetworkManager.service # The existence of this file reflects whether cloud-init's systemd-generator enables cloud-init. # If it does not exist, cloud-init won't run, so it's our turn. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/sbin/jeos-config new/jeos-firstboot-1.2.0.0/files/usr/sbin/jeos-config --- old/jeos-firstboot-1.1.1.1/files/usr/sbin/jeos-config 2022-03-16 15:55:07.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/sbin/jeos-config 2022-04-13 17:54:32.000000000 +0200 @@ -1,23 +1,6 @@ #!/bin/bash -# Copyright (c) 2020 SUSE LLC -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC . /etc/os-release . "/usr/share/jeos-firstboot/jeos-firstboot-functions" @@ -47,17 +30,22 @@ cleanup() { #call_module_hook cleanup - echo .oOo.oOo.oOo. > $dialog_out - rm -f "$dialog_out" - # reenable systemd and kernel logs echo } trap cleanup EXIT +# Get a list of all config modules +config_modules=() +for module in "${modules[@]}"; do + if module_has_hook "$module" "jeos_config"; then + config_modules+=("${module}") + fi +done + select_config() { - modules_order=("locale" '' "keytable" '' "timezone" '' "password" '' "network" '') - for module in "${modules[@]}"; do + modules_order=("locale" '' "keytable" '' "timezone" '' "password" '') + for module in "${config_modules[@]}"; do modules_order+=("${module}" '') done @@ -75,8 +63,7 @@ keytable Show configuration for keyboard timezone Show configuration for timezone password Show configuration for password - network Show configuration for network -$(for module in "${modules[@]}"; do +$(for module in "${config_modules[@]}"; do echo " ${module} Show configuration for ${module}" done) EOF @@ -124,20 +111,6 @@ dialog_timezone timedatectl set-timezone "$JEOS_TIMEZONE" ;; - network) - if [ "$(current_network_service)" = "NetworkManager" ]; then - nmtui - exit 0 - fi - - if ! d --yesno $"This will create a new network configuration from scratch, -all connections will be lost.\nDo you want to continue?" 7 50; then - exit 0 - fi - dialog_network - d --infobox $"Restarting network ..." 3 26 || true - systemctl restart network - ;; password) dialog_password apply_password diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/sbin/jeos-firstboot new/jeos-firstboot-1.2.0.0/files/usr/sbin/jeos-firstboot --- old/jeos-firstboot-1.1.1.1/files/usr/sbin/jeos-firstboot 2022-03-16 15:55:07.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/sbin/jeos-firstboot 2022-04-13 17:54:32.000000000 +0200 @@ -1,23 +1,6 @@ #!/bin/bash -# Copyright (c) 2015 SUSE LLC -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC set -e @@ -56,8 +39,6 @@ cleanup() { call_module_hook cleanup - echo .oOo.oOo.oOo. > $dialog_out - rm -f "$dialog_out" # reenable systemd and kernel logs # Try the race-free DBus method first if ! run dbus-send --system --print-reply --dest=org.freedesktop.systemd1 /org/freedesktop/systemd1 \ @@ -215,11 +196,6 @@ security fixes." 0 0 || true fi -## Configure initial network settings -if [ "$(current_network_service)" != "NetworkManager" ]; then - dialog_network -fi - call_module_hook systemd_firstboot d --infobox $"Applying firstboot settings ..." 3 40 || true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/sbin/jeos-firstboot-snapshot new/jeos-firstboot-1.2.0.0/files/usr/sbin/jeos-firstboot-snapshot --- old/jeos-firstboot-1.1.1.1/files/usr/sbin/jeos-firstboot-snapshot 2022-03-16 15:55:07.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/sbin/jeos-firstboot-snapshot 2022-04-13 17:54:32.000000000 +0200 @@ -1,24 +1,6 @@ #!/bin/bash -# -# Copyright (c) 2019 SUSE LLC -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC set -euo pipefail diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/jeos-firstboot-dialogs new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/jeos-firstboot-dialogs --- old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/jeos-firstboot-dialogs 2022-03-16 15:55:07.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/jeos-firstboot-dialogs 2022-04-13 17:54:32.000000000 +0200 @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC + menulist() { list=() @@ -75,45 +78,11 @@ if [ -z "$password" ]; then warn $"Warning: No root password set. -You cannot log in that way. A debug shell will be started on tty9 just this time. Use it to e.g. import your ssh key." 0 0 || true +You cannot log in that way. A debug shell will be started on tty9 just this time. Use it to e.g. import your ssh key." || true run systemctl start debug-shell.service fi break done } -dialog_network() -{ - d --infobox $"Collecting network info ..." 3 33 - - shopt -s nullglob - - for net_path in /sys/class/net/*; do - [ -d "$net_path" ] || continue # skip bonding_masters file - - net_device=${net_path##*/} - - [ "$net_device" = "lo" ] && continue - - # Only devices having ID_NET_NAME.* attrs - # Ignore errors if udev not available - udevadm info -q property -p "$net_path" 2>/dev/null | grep -qs ID_NET_NAME || continue - # But don't touch WLAN interfaces - udevadm info -q property -p "$net_path" | grep -qs "DEVTYPE=wlan" && continue - - unset IPADDR - eval `wicked test dhcp4 "$net_device" 2>/dev/null | grep -E "^IPADDR="` - ip link set down "$net_device" # set link down after probe once done - - # Create a configuration file for each interface that provides - # an IPADDR - if [ -n "$IPADDR" ]; then - printf "STARTMODE=auto\nBOOTPROTO=dhcp\n" \ - > "/etc/sysconfig/network/ifcfg-$net_device" - fi - done - - run sed -i -E 's/^DHCLIENT(6?)_SET_HOSTNAME=.*$/DHCLIENT\1_SET_HOSTNAME=yes/' /etc/sysconfig/network/dhcp -} - # vim: syntax=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/jeos-firstboot-functions new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/jeos-firstboot-functions --- old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/jeos-firstboot-functions 2022-03-16 15:55:07.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/jeos-firstboot-functions 2022-04-13 17:54:32.000000000 +0200 @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC + stty_size() { set -- `stty size`; LINES=$1; COLUMNS=$2 # stty size can return zero when not ready or @@ -26,6 +29,13 @@ popd &>/dev/null fi +module_has_hook() { + local module="$1" + local module_func="$2" + module_function="${module}_${module_func}" + [ "$(type -t -- "${module_function}")" = "function" ] +} + call_module() { local module="$1" local module_func="$2" @@ -44,39 +54,30 @@ return 0 } -dialog_out=`mktemp -qt 'firstboot-XXXXXX'` d(){ - retval= while true do retval=0 - dialog --backtitle "$PRETTY_NAME" --output-fd 3 "$@" 3>"${dialog_out}" || retval=$? + # Bash makes it a bit annoying to read the output of a different FD into a variable, it + # only supports reading stdout by itself. So redirect 3 to stdout and 1 to the real stdout. + exec {stdoutfd}>&1 + result="$(dialog --backtitle "$PRETTY_NAME" --output-fd 3 "$@" 3>&1 1>&${stdoutfd})" || retval=$? + # Word splitting makes it necessary to use eval here. + eval "exec ${stdoutfd}>&-" case $retval in 0) - # need || true as dialog doesn't write newlines - read result < $dialog_out || true return 0 ;; - 1) + 1|255) dialog --backtitle "$PRETTY_NAME" --yesno $"Do you really want to quit?" 0 0 && exit 1 continue ;; - 255) - result_error="$(xargs -a "$dialog_out")" - if [ -z "$result_error" ]; then - dialog --backtitle "$PRETTY_NAME" --yesno $"Do you really want to quit?" 0 0 && exit 1 - continue - fi - logger -p err -t jeos-firstboot "$result_error" - dialog --backtitle "$PRETTY_NAME" --msgbox $"Exiting due to error, please check the system log" 0 0 - exit 2 - ;; esac done } warn(){ - d --title $"Warning" --msgbox "$1" 6 40 + d --title $"Warning" --msgbox "$1" 0 0 } # Given the number of total item pairs, outputs the number of items to display at once @@ -155,11 +156,4 @@ fi } -# Returns the basename of the target of network.service, -# e.g. "wicked" or "NetworkManager" -current_network_service() -{ - systemctl show -P Id network.service | cut -d. -f1 -} - # vim: syntax=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/modules/network new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/modules/network --- old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/modules/network 1970-01-01 01:00:00.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/modules/network 2022-04-13 17:54:32.000000000 +0200 @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC + +# Returns the basename of the target of network.service, +# e.g. "wicked" or "NetworkManager" +current_network_service() +{ + systemctl show -P Id network.service | cut -d. -f1 +} + +network_service="$(current_network_service)" +if [ -e "/usr/share/jeos-firstboot/modules/network-modules/${network_service}" ]; then + . "/usr/share/jeos-firstboot/modules/network-modules/${network_service}" +else + echo "No network configuration module for ${network_service} found" >&2 +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/modules/network-modules/NetworkManager new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/modules/network-modules/NetworkManager --- old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/modules/network-modules/NetworkManager 1970-01-01 01:00:00.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/modules/network-modules/NetworkManager 2022-04-13 17:54:32.000000000 +0200 @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC + +network_jeos_config() +{ + nmtui +} + +network_systemd_firstboot() +{ + if [ "$(nmcli networking connectivity)" = "none" ]; then + welcome_screen_with_console_switch + + # Note: Dialog also flushes the input queue here. Without that, + # nmtui would react to what is typed before it shows up. + if dialog --backtitle "$PRETTY_NAME" --yesno $"No active network connection detected.\nDo you want to configure network connections?" 0 0; then + # nmtui (resp. libslang used by newt) uses /dev/tty, + # so setsid is required to set it to the current one. + setsid -wc nmtui + # setsid steals our tty connection, reopen it + if [ "$console" != "$(tty)" ]; then + exec 0<>"$console" 1>&0 + fi + fi + fi +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/modules/network-modules/wicked new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/modules/network-modules/wicked --- old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/modules/network-modules/wicked 1970-01-01 01:00:00.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/modules/network-modules/wicked 2022-04-13 17:54:32.000000000 +0200 @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC + +do_wicked_autoconfig() +{ + d --infobox $"Collecting network info ..." 3 33 + + shopt -s nullglob + + for net_path in /sys/class/net/*; do + [ -d "$net_path" ] || continue # skip bonding_masters file + + net_device=${net_path##*/} + + [ "$net_device" = "lo" ] && continue + + # Only devices having ID_NET_NAME.* attrs + # Ignore errors if udev not available + udevadm info -q property -p "$net_path" 2>/dev/null | grep -qs ID_NET_NAME || continue + # But don't touch WLAN interfaces + udevadm info -q property -p "$net_path" | grep -qs "DEVTYPE=wlan" && continue + + unset IPADDR + eval `wicked test dhcp4 "$net_device" 2>/dev/null | grep -E "^IPADDR="` + ip link set down "$net_device" # set link down after probe once done + + # Create a configuration file for each interface that provides + # an IPADDR + if [ -n "$IPADDR" ]; then + printf "STARTMODE=auto\nBOOTPROTO=dhcp\n" \ + > "/etc/sysconfig/network/ifcfg-$net_device" + fi + done + + run sed -i -E 's/^DHCLIENT(6?)_SET_HOSTNAME=.*$/DHCLIENT\1_SET_HOSTNAME=yes/' /etc/sysconfig/network/dhcp +} + +network_jeos_config() +{ + if ! dialog --backtitle "$PRETTY_NAME" --yesno $"This will create a new network configuration from scratch, +all connections will be lost.\nDo you want to continue?" 7 50; then + return + fi + do_wicked_autoconfig + d --infobox $"Restarting network ..." 3 26 || true + systemctl restart network +} + +network_systemd_firstboot() +{ + do_wicked_autoconfig +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/modules/raspberrywifi new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/modules/raspberrywifi --- old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/modules/raspberrywifi 2022-03-16 15:55:07.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/modules/raspberrywifi 2022-04-13 17:54:32.000000000 +0200 @@ -1,22 +1,5 @@ -# Copyright (c) 2019 SUSE LLC -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC config_wireless=false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/welcome-screen new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/welcome-screen --- old/jeos-firstboot-1.1.1.1/files/usr/share/jeos-firstboot/welcome-screen 2022-03-16 15:55:07.000000000 +0100 +++ new/jeos-firstboot-1.2.0.0/files/usr/share/jeos-firstboot/welcome-screen 2022-04-13 17:54:32.000000000 +0200 @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: Copyright 2015-2022 SUSE LLC + # Function to allow showing dialogs (or other stuff) on all consoles. # At its core, it works by spawning processes with the given command on each # console and waits for them to finish. If any exits with an exit status other ++++++ jeos-firstboot.obsinfo ++++++ --- /var/tmp/diff_new_pack.2taP9h/_old 2022-04-16 00:13:31.201590680 +0200 +++ /var/tmp/diff_new_pack.2taP9h/_new 2022-04-16 00:13:31.205590685 +0200 @@ -1,5 +1,5 @@ name: jeos-firstboot -version: 1.1.1.1 -mtime: 1647442507 -commit: e0ae3fee933953e5f6c2c52fff95ac253ba8e315 +version: 1.2.0.0 +mtime: 1649865272 +commit: ae0d7193f1956e4d9461ae25629dbcf26ed7f47a