mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
Merge pull request #402 from abathur/fix_newer_apfs.util_error
fix dependence on apfs.util exit code
This commit is contained in:
commit
5851d9613e
1 changed files with 9 additions and 4 deletions
|
@ -43,16 +43,21 @@ with lib;
|
|||
case "$i" in
|
||||
y|Y)
|
||||
if ! grep -q '^run\b' /etc/synthetic.conf 2>/dev/null; then
|
||||
echo "setting up /etc/synthetic.conf..."
|
||||
echo "setting up /run via /etc/synthetic.conf..."
|
||||
echo -e "run\tprivate/var/run" | sudo tee -a /etc/synthetic.conf >/dev/null
|
||||
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -B &>/dev/null \
|
||||
|| /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -t &>/dev/null \
|
||||
|| echo "warning: failed to execute apfs.util"
|
||||
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -B &>/dev/null || true
|
||||
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -t &>/dev/null || true
|
||||
if ! test -L /run; then
|
||||
echo "warning: apfs.util failed to symlink /run"
|
||||
fi
|
||||
fi
|
||||
if ! test -L /run; then
|
||||
echo "setting up /run..."
|
||||
sudo ln -sfn private/var/run /run
|
||||
fi
|
||||
if ! test -L /run; then
|
||||
echo "warning: failed to symlink /run"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue