when i tried to get the wsusoffline command line functionality to run on a FreeBSD 12.1 system I came across some hickups which I was able to resolve.
As information, the installation of the following packages via "pkg" is sufficient to provide the required binaries:
bash cabextract md5deep unzip wget xmlstarlet cdrkit-genisoimage rsync
Running the "fix-file-permissions.bash" script as described in the manual was successfull either.
An attempt to then run the "download-updates.bash" script failed at multiple parts, I was able to make changes which provide full functionality, I will attach the corresponding patch files at the end.
The developers are welcome to glance over them and are free to decide if the changes could in some way or another be applied to the main code to assure 100% FreeBSD compatibility because missing out on it would be a shame in my opinion since there are so little needed changes based on the current status.
download-updates.bash.patch
- Code: Select all
--- wsusoffline/sh/download-updates.bash.org 2019-11-29 10:05:17.612798000 +0100
+++ wsusoffline/sh/download-updates.bash 2019-11-29 09:38:45.573248000 +0100
@@ -213,13 +213,13 @@
# Create a temporary directory:
-if type -P mktemp >/dev/null
-then
- temp_dir="$(mktemp -d -p "/tmp" download-updates.XXXXXXXXXX)"
-else
+#if type -P mktemp >/dev/null
+#then
+# temp_dir="$(mktemp -d -p "/tmp" download-updates.XXXXXXXXXX)"
+#else
temp_dir="/tmp/download-updates.temp"
mkdir -p "${temp_dir}"
-fi
+#fi
# ========== Preferences =================================================
20-get-sysinternals-helpers.bash.patch
- Code: Select all
--- wsusoffline/sh/download-updates-tasks/20-get-sysinternals-helpers.bash.org 2019-11-29 11:00:16.132948000 +0100
+++ wsusoffline/sh/download-updates-tasks/20-get-sysinternals-helpers.bash 2019-11-29 11:00:39.039397000 +0100
@@ -170,7 +170,7 @@
|| [[ ! -f "../client/bin/Autologon.exe" ]]
then
log_info_message "Unpacking archive AutoLogon.zip"
- if ! unzip -u -o "${cache_dir}/AutoLogon.zip" "Autologon.exe" -d "../client/bin"
+ if ! unzip -u "${cache_dir}/AutoLogon.zip" "Autologon.exe" -d "../client/bin"
then
log_error_message "Unpacking of AutoLogon.zip failed."
increment_error_count
@@ -182,7 +182,7 @@
|| [[ ! -f "../bin/sigcheck64.exe" ]]
then
log_info_message "Unpacking archive Sigcheck.zip"
- if ! unzip -u -o "${cache_dir}/Sigcheck.zip" "sigcheck.exe" "sigcheck64.exe" -d "../bin"
+ if ! unzip -u "${cache_dir}/Sigcheck.zip" "sigcheck.exe" "sigcheck64.exe" -d "../bin"
then
log_error_message "Unpacking of Sigcheck.zip failed."
increment_error_count
@@ -194,7 +194,7 @@
|| [[ ! -f "../bin/streams64.exe" ]]
then
log_info_message "Unpacking archive Streams.zip"
- if ! unzip -u -o "${cache_dir}/Streams.zip" "streams.exe" "streams64.exe" -d "../bin"
+ if ! unzip -u "${cache_dir}/Streams.zip" "streams.exe" "streams64.exe" -d "../bin"
then
log_error_message "Unpacking of Streams.zip failed."
increment_error_count
90-finalization.bash.patch
- Code: Select all
--- wsusoffline/sh/download-updates-tasks/90-finalization.bash.org 2019-11-29 10:34:55.112077000 +0100
+++ wsusoffline/sh/download-updates-tasks/90-finalization.bash 2019-11-29 10:53:39.609646000 +0100
@@ -37,7 +37,7 @@
function copy_unzip ()
{
- cp -u "../bin/unzip.exe" "../client/bin/"
+ cp -f "../bin/unzip.exe" "../client/bin/"
}