mirror of
https://github.com/ryantm/agenix.git
synced 2024-11-25 02:58:30 +03:00
Use diskutil for more convenient sizes, strip trailing tabs
This commit is contained in:
parent
b818ac2e7d
commit
c69689da58
1 changed files with 3 additions and 1 deletions
|
@ -23,7 +23,9 @@ with lib; let
|
|||
if isDarwin
|
||||
then ''
|
||||
if ! diskutil info "${cfg.secretsMountPoint}" &> /dev/null; then
|
||||
dev=$(hdiutil attach -nomount ram://1MiB)
|
||||
dev=$(diskutil image attach -mountPolicy=noMount ram://1MiB)
|
||||
# Remove trailing tabs
|
||||
dev=''${dev%%[[:space:]]*}
|
||||
newfs_hfs -v agenix "$dev"
|
||||
mount -t hfs -o nobrowse,nodev,nosuid,-m=0751 "$dev" "${cfg.secretsMountPoint}"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue