Skip to content

Commit 1f62332

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
server: allow passing additional custom repos
Allow passing an arbitrary list of custom repo urls (space separated). This makes is a lot simpler to create a very custom image. When using custom repos, it assumes you are taking control of the ceph deps (as I am) and turns off auto-setup of the ceph repo when you use --custom-repos. Signed-off-by: John Mulligan <[email protected]>
1 parent 594f284 commit 1f62332

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

images/server/install-packages.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ if [[ "$1" =~ ^--.+$ ]]; then
8989
--samba-version-suffix=*) samba_version_suffix="${arg/*=/}" ;;
9090
--install-custom-repo=*) install_custom_repo="${arg/*=/}" ;;
9191
--package-selection=*) package_selection="${arg/*=/}" ;;
92+
--custom-repos=*)
93+
IFS=' ' read -ra custom_repos <<< "${arg/*=/}"
94+
for x in "${custom_repos[@]}"; do echo custom repo: "$x"; done
95+
;;
9296
*)
9397
echo "error: unexpected argument: ${arg}"
9498
exit 2
@@ -122,7 +126,14 @@ case "${install_packages_from}" in
122126
;;
123127
custom-repo)
124128
get_custom_repo "${install_custom_repo}"
125-
get_distro_ceph_repo
129+
customized=0
130+
for crepo in "${custom_repos[@]}" ; do
131+
get_custom_repo "${crepo}"
132+
customized=1
133+
done
134+
if [ $customized != 1 ]; then
135+
get_distro_ceph_repo
136+
fi
126137
package_selection=${package_selection:-custom}
127138
;;
128139
custom-devbuilds)

0 commit comments

Comments
 (0)