-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Nuru <[email protected]>
- Loading branch information
1 parent
634aaa9
commit 90fa1b9
Showing
12 changed files
with
92 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
busybox-extras | ||
diffutils | ||
drill | ||
fuse | ||
fzf-bash-completion | ||
iputils | ||
keybase-client@testing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Essential debian-only packages | ||
bindfs | ||
default-mysql-client | ||
dnsutils | ||
inetutils-ftp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
|
||
IMPORTANT: | ||
* Unless there were errors reported above, | ||
* your host $HOME directory should be mounted to `/localhost`, and | ||
* your host AWS configuration and credentials should be available. | ||
* Use Leapp on your host computer to manage your credentials. | ||
* Leapp is free, open source, and available from https://leapp.cloud | ||
* Use AWS_PROFILE environment variable to manage your AWS IAM role. | ||
* You can interactively select AWS profiles via the `assume-role` command. | ||
# Unless there were errors reported above, | ||
# * Your host $HOME directory should be available under `/localhost` | ||
# * Your host AWS configuration and credentials should be available | ||
# * Use Leapp on your host computer to manage your credentials | ||
# * Leapp is free, open source, and available from https://leapp.cloud | ||
# * Use AWS_PROFILE environment variable to manage your AWS IAM role | ||
# * You can interactively select AWS profiles via the `assume-role` command | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Files in the profile.d directory are executed by the lexicographical order of their file names. | ||
# This file is named _20-localhost.sh. The leading underscore is needed to ensure this file executes before | ||
# other files that depend on the file system mapping defined here. | ||
# The number portion is to ensure proper ordering among the high-priority scripts. | ||
# This file has only depends on colors.sh and should come before any scripts that | ||
# attempt to access files on the host via `/localhost`. | ||
|
||
if [[ $SHLVL == 1 ]] && [[ -n $GEODESIC_HOST_UID ]] && [[ -n $GEODESIC_HOST_GID ]] \ | ||
&& [[ -n $GEODESIC_LOCALHOST ]] && df -a | grep -q " ${GEODESIC_LOCALHOST}\$"; then | ||
if [[ $(df -a | grep ' /localhost$') =~ ^${GEODESIC_LOCALHOST} ]]; then | ||
echo "# Host file ownership mapping already configured" | ||
export GEODESIC_LOCALHOST_MAPPED_DEVICE="${GEODESIC_LOCALHOST}" | ||
elif df -a | grep -q ' /localhost$'; then | ||
red "# Host filesystems found mounted at both /localhost and /localhost.bindfs." | ||
red "# * Verify that content under /localhost is what you expect." | ||
red "# * Report the issue at https://github.com/cloudposse/geodesic/issues" | ||
red "# Include the output of `env | grep GEODESIC` in your issue description." | ||
elif bindfs -o nonempty ${GEODESIC_BINDFS_OPTIONS} --create-for-user="$GEODESIC_HOST_UID" --create-for-group="$GEODESIC_HOST_GID" "${GEODESIC_LOCALHOST}" /localhost; then | ||
green "# Files on host (under /localhost) will be created with UID:GID ${GEODESIC_HOST_UID}:${GEODESIC_HOST_GID}" | ||
export GEODESIC_LOCALHOST_MAPPED_DEVICE="${GEODESIC_LOCALHOST}" | ||
else | ||
red "# ERROR: Unable to mirror /localhost.bindfs to /localhost" | ||
red "# * Report the issue at https://github.com/cloudposse/geodesic/issues" | ||
red "# * Work around the issue by setting shell environment variable" | ||
red "# GEODESIC_HOST_BINDFS=disabled" | ||
red "# before running Geodesic." | ||
red "# * Exiting." | ||
exec false | ||
fi | ||
fi |
8 changes: 5 additions & 3 deletions
8
rootfs/etc/profile.d/_geodesic-config.sh → rootfs/etc/profile.d/_30-geodesic-config.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters