1#!/usr/bin/env bash
2set -e
3
4rootfsDir="$1"
5shift
6
7# specifying --arch below is safe because "$@" can override it and the "latest" one wins :)
8
9(
10	set -x
11	rinse --directory "$rootfsDir" --arch amd64 "$@"
12)
13
14"$(dirname "$BASH_SOURCE")/.febootstrap-minimize" "$rootfsDir"
15
16if [ -d "$rootfsDir/etc/sysconfig" ]; then
17	# allow networking init scripts inside the container to work without extra steps
18	echo 'NETWORKING=yes' > "$rootfsDir/etc/sysconfig/network"
19fi
20
21# make sure we're fully up-to-date, too
22(
23	set -x
24	chroot "$rootfsDir" yum update -y
25)
26