Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Nix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nora Puchreiner
Nix
Commits
fe807904
Commit
fe807904
authored
4 years ago
by
Travis A. Everett
Browse files
Options
Downloads
Patches
Plain Diff
adapt to apfs.util flag diff in catalina/big sur
Fixes #3957. Just runs both forms to minimize moving parts.
parent
e736f8f6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/create-darwin-volume.sh
+15
-1
15 additions, 1 deletion
scripts/create-darwin-volume.sh
with
15 additions
and
1 deletion
scripts/create-darwin-volume.sh
+
15
−
1
View file @
fe807904
...
@@ -26,6 +26,20 @@ test_synthetic_conf() {
...
@@ -26,6 +26,20 @@ test_synthetic_conf() {
grep
-q
"^nix$"
/etc/synthetic.conf 2>/dev/null
grep
-q
"^nix$"
/etc/synthetic.conf 2>/dev/null
}
}
# Create the paths defined in synthetic.conf, saving us a reboot.
create_synthetic_objects
(){
# Big Sur takes away the -B flag we were using and replaces it
# with a -t flag that appears to do the same thing (but they
# don't behave exactly the same way in terms of return values).
# This feels a little dirty, but as far as I can tell the
# simplest way to get the right one is to just throw away stderr
# and call both... :]
{
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util
-t
||
true
# Big Sur
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util
-B
||
true
# Catalina
}
>
/dev/null 2>&1
}
test_nix
()
{
test_nix
()
{
test
-d
"/nix"
test
-d
"/nix"
}
}
...
@@ -101,7 +115,7 @@ main() {
...
@@ -101,7 +115,7 @@ main() {
if
!
test_nix
;
then
if
!
test_nix
;
then
echo
"Creating mountpoint for /nix..."
>
&2
echo
"Creating mountpoint for /nix..."
>
&2
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util
-B
||
true
create_synthetic_objects
# the ones we defined in synthetic.conf
if
!
test_nix
;
then
if
!
test_nix
;
then
sudo mkdir
-p
/nix 2>/dev/null
||
true
sudo mkdir
-p
/nix 2>/dev/null
||
true
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment