Commit Diff


commit - c798ff754af0214aabcc13c28cd11e48ddcf0062
commit + 8bf613ac25a0aca0bdc6ef60d43311a7b1f4ed02
blob - 5dd9a4bd716ded58cd68d3742e322e876bd34a71
blob + 3ccc28b8d897f2a2880a4e4e73068c75b8e88dd4
--- r7
+++ r7
@@ -1255,6 +1255,24 @@ html() {
 import() {
 	cd "$R7_WORKDIR" || _fail "Unable to cd to '$R7_WORKDIR'"
 	target=$1
+	if test -n "$target"; then
+		echo >&2 "-> Importing target host: $target"
+		case $(ssh "$target" uname) in OpenBSD)
+			_OpenBSD_import
+			;;
+		Linux) : ;;
+		*)
+			_error "Platform unsupported or host unavailable."
+			return 3
+			;;
+		esac
+		echo >&2 "-> done: $target"
+	else
+		echo >&2 "usage: $0 target-host"
+	fi
+}
+
+_OpenBSD_import() {
 	etc_files_to_import='
 		acme-client.conf
 		dhcpd.conf
@@ -1295,24 +1313,14 @@ import() {
 		data/pg_hba.conf
 		data/postgresql.conf
 	'
-	if test -n "$target"; then
-		echo >&2 "-> Importing target host: $target"
-		case $(ssh "$target" uname) in OpenBSD) : ;; *)
-			_error "Platform unsupported or host unavailable."
-			return 3
-			;;
-		esac
-		_OpenBSD_import_ssh_authorized_keys
-		_OpenBSD_import_etc_if_exists
-		_OpenBSD_import_etc_ssh_if_exists
-		_OpenBSD_import_etc_mail_if_exists
-		_OpenBSD_import_unbound_if_enabled
-		_OpenBSD_import_nsd_if_enabled
-		_OpenBSD_import_postgresql_if_installed
-		echo >&2 "-> done: $target"
-	else
-		echo >&2 "usage: $0 target-host"
-	fi
+	_OpenBSD_import_ssh_authorized_keys
+	_OpenBSD_import_etc_if_exists
+	_OpenBSD_import_etc_ssh_if_exists
+	_OpenBSD_import_etc_mail_if_exists
+	_OpenBSD_import_unbound_if_enabled
+	_OpenBSD_import_nsd_if_enabled
+	_OpenBSD_import_postgresql_if_installed
+
 }
 
 _OpenBSD_import_ssh_authorized_keys() {