Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colemickens/1b4da8010116549cf2a40465572db38f to your computer and use it in GitHub Desktop.
Save colemickens/1b4da8010116549cf2a40465572db38f to your computer and use it in GitHub Desktop.
#!/nix/store/4la2w29x16vnm4fwcz7qfs0m45dgb8hl-bash-4.4-p23/bin/bash -e
function usage {
echo "USAGE: $0 INITRD_FILE" >&2
echo "Appends this configuration's secrets to INITRD_FILE" >&2
}
if [ $# -ne 1 ]; then
usage
exit 1
fi
if [ "$1"x = "--helpx" ]; then
usage
exit 0
fi
exit 0
export PATH=/nix/store/qyfkk34jqq9ax0dd2b7k1vqw6m8ifn11-coreutils-8.31/bin:/nix/store/csb49cchjmi129qqaax2qszswigxjj7k-cpio-2.13/bin:/nix/store/m21hy9k7sncyrdvkjvm42r50pcsmw26j-gzip-1.10/bin:/nix/store/3nj909gzm42f2ffqx0zam5liw79067cx-findutils-4.7.0/bin
function cleanup {
if [ -n "$tmp" -a -d "$tmp" ]; then
rm -fR "$tmp"
fi
}
trap cleanup EXIT
tmp=$(mktemp -d initrd-secrets.XXXXXXXXXX)
(cd "$tmp" && find . | cpio -H newc -o) | gzip >>"$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment