Add patches

devel
Alexey Lyubimov 1 year ago
parent aae1d8d2cf
commit d6fd9c7155

@ -0,0 +1,97 @@
commit 773e74d25eacaeb123594c5144d5597fdae29cf7
Author: Eugene Zamriy <eugene@zamriy.info>
Date: Wed Apr 5 20:36:32 2023 +0300
Adds MSVSphere distribution support
diff --git a/README.md b/README.md
index ff1b5f5..5f59b3e 100644
--- a/README.md
+++ b/README.md
@@ -37,6 +37,7 @@ List of tested platforms only:
| Devuan | 2 |
| Fedora | 34, 35 |
| FreeBSD | 12, 13 |
+| MSVSphere | 8, 9 |
| openSUSE | 15 |
| Oracle Linux | 7, 8 |
| Red Hat Enterprise Linux | 7, 8, 9 |
@@ -77,20 +78,20 @@ Following IPv6 configuration methods are supported via NIC attribute `IP6_METHOD
Selectable configuration types and IP configuration methods are **supported only on the following platforms**:
-| Platform | Network Type (`NETCFG_TYPE`) |
-|---------------------------------------------------------------|-------------------------------------------|
-| Alpine Linux 3.14+ | `interfaces` |
-| ALT Linux p10, Sisyphus | `networkd`, `nm` |
-| Amazon Linux 2 | `scripts` |
-| Debian 10+ | `interfaces`, `netplan`, `nm`, `networkd` |
-| Devuan 2 | `interfaces` |
-| Fedora 34+ | `scripts`, `nm`, `networkd` |
-| FreeBSD 12+ | `bsd` |
-| openSUSE 15 | `scripts` |
-| RHEL-like 7 (CentOS, Oracle Linux) | `scripts` |
-| RHEL-like 8 (CentOS, Oracle/Rocky/AlmaLinux) | `scripts`, `nm`, `networkd` |
-| RHEL-like 9 (CentOS Stream 9, Oracle/Rocky/AlmaLinux) | `nm`, `networkd` |
-| Ubuntu 18.04, 20.04, 21.10, 22.04 | `interfaces`, `netplan`, `nm`, `networkd` |
+| Platform | Network Type (`NETCFG_TYPE`) |
+|-----------------------------------------------------------------|-------------------------------------------|
+| Alpine Linux 3.14+ | `interfaces` |
+| ALT Linux p10, Sisyphus | `networkd`, `nm` |
+| Amazon Linux 2 | `scripts` |
+| Debian 10+ | `interfaces`, `netplan`, `nm`, `networkd` |
+| Devuan 2 | `interfaces` |
+| Fedora 34+ | `scripts`, `nm`, `networkd` |
+| FreeBSD 12+ | `bsd` |
+| openSUSE 15 | `scripts` |
+| RHEL-like 7 (CentOS, Oracle Linux) | `scripts` |
+| RHEL-like 8 (CentOS, Oracle/Rocky/AlmaLinux/MSVSphere) | `scripts`, `nm`, `networkd` |
+| RHEL-like 9 (CentOS Stream 9, Oracle/Rocky/AlmaLinux/MSVSphere) | `nm`, `networkd` |
+| Ubuntu 18.04, 20.04, 21.10, 22.04 | `interfaces`, `netplan`, `nm`, `networkd` |
(other than listed platforms are not supported for using `NETCFG_TYPE` nor `METHOD`/`IP6_METHOD`!):
diff --git a/src/etc/one-context.d/loc-10-network b/src/etc/one-context.d/loc-10-network
index 600102b..b37f7e5 100755
--- a/src/etc/one-context.d/loc-10-network
+++ b/src/etc/one-context.d/loc-10-network
@@ -39,7 +39,7 @@ if [ -z "${NETCFG_TYPE}" ] ; then
debian|devuan|ubuntu)
NETCFG_TYPE='interfaces netplan nm networkd'
;;
- fedora|centos|rhel|almalinux|ol|rocky)
+ fedora|centos|rhel|almalinux|ol|rocky|msvsphere)
NETCFG_TYPE='scripts nm networkd'
;;
opensuse*|sles|sled)
diff --git a/src/usr/sbin/onesysprep b/src/usr/sbin/onesysprep
index f13f66f..2a77d9b 100755
--- a/src/usr/sbin/onesysprep
+++ b/src/usr/sbin/onesysprep
@@ -513,7 +513,7 @@ syscheck()
debian|ubuntu|devuan)
return 0
;;
- fedora|centos|rhel|almalinux|ol|rocky|amzn)
+ fedora|centos|rhel|almalinux|ol|rocky|amzn|msvsphere)
return 0
;;
opensuse*|sles|sled)
@@ -553,7 +553,7 @@ enter_single_mode()
return 0
fi
;;
- debian|ubuntu|devuan|fedora|centos|rhel|almalinux|ol|rocky|altlinux|opensuse*)
+ debian|ubuntu|devuan|fedora|centos|rhel|almalinux|ol|rocky|msvsphere|altlinux|opensuse*)
_runlevel=$(runlevel | cut -d" " -f2)
case "$_runlevel" in
1|S)
@@ -589,7 +589,7 @@ enter_single_mode()
msg "Entering single user mode..."
rc single
;;
- debian|ubuntu|devuan|fedora|centos|rhel|almalinux|ol|rocky|altlinux|opensuse*)
+ debian|ubuntu|devuan|fedora|centos|rhel|almalinux|ol|rocky|msvsphere|altlinux|opensuse*)
ask_to_enter_single_user_mode
msg "Entering single user mode..."
telinit 1

@ -0,0 +1,30 @@
diff --git a/generate.sh b/generate.sh
index c9e3b82..1ada8e4 100755
--- a/generate.sh
+++ b/generate.sh
@@ -85,7 +85,6 @@ fi
set -e
UNAME_PATH=$(mktemp -d)
-BUILD_DIR=$(mktemp -d)
_POSTIN=$(mktemp)
_PREUN=$(mktemp)
@@ -93,7 +92,7 @@ _POSTUN=$(mktemp)
_POSTUP=$(mktemp)
# shellcheck disable=SC2064
-trap "rm -rf ${UNAME_PATH} ${BUILD_DIR} ${_POSTIN} ${_PREUN} ${_POSTUN} ${_POSTUP}" EXIT
+trap "rm -rf ${UNAME_PATH} ${_POSTIN} ${_PREUN} ${_POSTUN} ${_POSTUP}" EXIT
while IFS= read -r -d $'\0' SRC; do
F_TAGS=${SRC##*##}
@@ -185,7 +184,7 @@ else
"${BUILD_DIR}/usr/sbin/onesysprep"
# shellcheck disable=SC2086
- fpm --name "${NAME}" --version "${VERSION}" --iteration "${RELEASE_FULL}" \
+echo 'Info: Composed fpm command is' fpm --name "${NAME}" --version "${VERSION}" --iteration "${RELEASE_FULL}" \
--architecture all --license "${LICENSE}" \
--vendor "${VENDOR}" --maintainer "${MAINTAINER}" \
--description "${DESCRIPTION}" --url "${URL}" \
Loading…
Cancel
Save