Add 'update' hook for offline mirror
* Those would prevent failures for 2018q3+ model releases, where
'system.linux.system.repo.mcp.apt_mirantis.update.xxx'
enabled by default, but not in offline mirror by default
Change-Id: I8d7b13d91e24a34c6c7a271ddc065f3d39f0b0e1
diff --git a/mirror-image/scripts/mirrors.sh b/mirror-image/scripts/mirrors.sh
index 83499de..224ebe7 100644
--- a/mirror-image/scripts/mirrors.sh
+++ b/mirror-image/scripts/mirrors.sh
@@ -24,3 +24,11 @@
#git
salt-call ${SALT_OPTS} state.sls git.server
+# Enable 'update' hook.
+# Those would prevent failures for 2018q3+ model releases, where
+# 'system.linux.system.repo.mcp.apt_mirantis.update.xxx' enabled by default
+pushd /srv/volumes/aptly/public/
+ CUR_V=$(salt-call pillar.get _param:apt_mk_version --out text | awk '{print $2}')
+ mkdir -p update
+ ln -s ../${CUR_V} update/${CUR_V} || true
+popd