Skip to content

Commit f96e110

Browse files
authored
Merge pull request #519 from masnax/misc
Fix UI overrides & post-migration script
2 parents 499a2bd + 5a6851b commit f96e110

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

internal/worker/scripts/add-udev-network-rules.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ NETWORKMANAGER_DEVS=$(grep -P -h -o "(?<=interface-name\=).*" /etc/NetworkManage
4747
NET_INTERFACES_DEVS=$(grep -P -o "(?<=iface ).*(?= inet)" /etc/network/interfaces | sort | uniq | grep -v "^lo$")
4848
NET_SYSTEMD_DEVS=$(grep "^Name=" /etc/systemd/network/10-cloud-init-*.network | cut -d'=' -f2)
4949
# shellcheck disable=SC2046,SC3009
50-
NET_SCRIPTS_DEVS=$(basename -a $(find /etc/sysconfig/network{,-scripts}/ifcfg-* -exec grep -l '^ONBOOT=yes' {} +) | grep -P -o "(?<=ifcfg-).*" | sort | uniq | grep -v "lo$" | grep -v "\.bak$")
50+
NET_SCRIPTS_DEVS=$(basename -a $(find /etc/sysconfig/network{,-scripts}/ifcfg-* -exec grep -L '^ONBOOT="\?no' {} +) | grep -P -o "(?<=ifcfg-).*" | sort | uniq | grep -v "lo$" | grep -v "\.bak$")
5151

5252
if [ ${#NETPLAN_DEVS} -gt 0 ]; then
5353
echo "Processing netplan devs: [${NETPLAN_DEVS}]"

internal/worker/scripts/dracut-add-virtio-drivers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ else
4040

4141
modules="$(echo "${modules}" |cut -d'"' -f1-2) virtio virtio_blk virtio_net virtio_pci\""
4242
sed -e "s/^INITRD_MODULES=.*/${modules}/" -i /etc/sysconfig/kernel
43-
if ! mkinitrd -f ; then
43+
if ! mkinitrd ; then
4444
echo "Fallback to explicit mkinitrd"
4545
for f in /lib/modules/* ; do
4646
version="$(basename "${f}")"

ui/src/components/InstanceOverrides.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,11 @@ const InstanceOverrides: FC = () => {
129129
memory: memoryInBytes,
130130
cpus: values.cpus,
131131
config: values.config,
132-
os_type: values.os_type,
133-
distribution: values.distribution,
132+
os_type: values.os_type != instance?.os_type ? values.os_type : "",
133+
distribution:
134+
values.distribution != instance?.distribution
135+
? values.distribution
136+
: "",
134137
distribution_version: values.distribution_version,
135138
started_after_migration: values.started_after_migration == "true",
136139
stopped_after_migration: values.stopped_after_migration == "true",

0 commit comments

Comments
 (0)