about summary refs log tree commit diff
path: root/nixos/modules/system/etc/make-etc.sh
diff options
context:
space:
mode:
authorDanylo Hlynskyi <abcz2.uprola@gmail.com>2019-02-28 07:48:40 +0200
committerGitHub <noreply@github.com>2019-02-28 07:48:40 +0200
commit79cc48cdbbd941697e4e812e0c78c647adb6ba11 (patch)
tree852a337e58b317ad19b41b9e2535ea35170091d9 /nixos/modules/system/etc/make-etc.sh
parent5dee926eb9f53b3e6990a528da30006fe2a6b931 (diff)
downloadnixlib-79cc48cdbbd941697e4e812e0c78c647adb6ba11.tar
nixlib-79cc48cdbbd941697e4e812e0c78c647adb6ba11.tar.gz
nixlib-79cc48cdbbd941697e4e812e0c78c647adb6ba11.tar.bz2
nixlib-79cc48cdbbd941697e4e812e0c78c647adb6ba11.tar.lz
nixlib-79cc48cdbbd941697e4e812e0c78c647adb6ba11.tar.xz
nixlib-79cc48cdbbd941697e4e812e0c78c647adb6ba11.tar.zst
nixlib-79cc48cdbbd941697e4e812e0c78c647adb6ba11.zip
Revert "Merge pull request #54980 from danbst/etc-relative" (#56507)
This reverts commit 0b91fa43e40c121ff4682256aa46a425c984da6c, reversing
changes made to 183919a0c072061b98ebe9fca2e899ade871ff1c.
Diffstat (limited to 'nixos/modules/system/etc/make-etc.sh')
-rw-r--r--nixos/modules/system/etc/make-etc.sh15
1 files changed, 5 insertions, 10 deletions
diff --git a/nixos/modules/system/etc/make-etc.sh b/nixos/modules/system/etc/make-etc.sh
index 9c0520e92fc2..1ca4c3046f0e 100644
--- a/nixos/modules/system/etc/make-etc.sh
+++ b/nixos/modules/system/etc/make-etc.sh
@@ -10,11 +10,6 @@ users_=($users)
 groups_=($groups)
 set +f
 
-# Create relative symlinks, so that the links can be followed if
-# the NixOS installation is not mounted as filesystem root.
-# Absolute symlinks violate the os-release format
-# at https://www.freedesktop.org/software/systemd/man/os-release.html
-# and break e.g. systemd-nspawn and os-prober.
 for ((i = 0; i < ${#targets_[@]}; i++)); do
     source="${sources_[$i]}"
     target="${targets_[$i]}"
@@ -24,14 +19,14 @@ for ((i = 0; i < ${#targets_[@]}; i++)); do
         # If the source name contains '*', perform globbing.
         mkdir -p $out/etc/$target
         for fn in $source; do
-            ln -s --relative "$fn" $out/etc/$target/
+            ln -s "$fn" $out/etc/$target/
         done
 
     else
-
+        
         mkdir -p $out/etc/$(dirname $target)
         if ! [ -e $out/etc/$target ]; then
-            ln -s --relative $source $out/etc/$target
+            ln -s $source $out/etc/$target
         else
             echo "duplicate entry $target -> $source"
             if test "$(readlink $out/etc/$target)" != "$source"; then
@@ -39,13 +34,13 @@ for ((i = 0; i < ${#targets_[@]}; i++)); do
                 exit 1
             fi
         fi
-
+        
         if test "${modes_[$i]}" != symlink; then
             echo "${modes_[$i]}"  > $out/etc/$target.mode
             echo "${users_[$i]}"  > $out/etc/$target.uid
             echo "${groups_[$i]}" > $out/etc/$target.gid
         fi
-
+        
     fi
 done