Corrects unexpected failure with hab-pkg-dockerize
@@ -577,9 +577,21 @@ EOF
# Studio filesystem so that commands such as `wget(1)` will work
for f in /etc/hosts /etc/resolv.conf /etc/nsswitch.conf; do
$bb mkdir -p $v $($bb dirname $f)
- $bb cp $v $f $HAB_STUDIO_ROOT$f
if [ $f = "/etc/nsswitch.conf" ] ; then
- echo 'hosts: files dns' > $f
+ $bb touch $HAB_STUDIO_ROOT$f
+ $bb cat <<EOF > "$f"
+passwd: files
+group: files
+shadow: files
+
+hosts: files dns
+networks: files
+
+rpc: files
+services: files
+EOF
+ else
+ $bb cp $v $f $HAB_STUDIO_ROOT$f
fi
done
