summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-05-16 09:42:38 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2012-05-16 09:42:38 +0100
commit10f8222ae4172220c7422719550107257d4aedff (patch)
tree4bd31902f9af21e6b2e8e9d4a180142e63bfa601
parent344208aa81a079a888cdde7082b2a8e602192e00 (diff)
downloadfhs-dirs-10f8222ae4172220c7422719550107257d4aedff.tar.gz
fhs-dirs: generalize symlinks, /var/run -> /run
Given we need more than one symlink now it is appropriate to provide a general mechanism for listing them, like with dirs /run is usually a tmpfs and /var/run is semantically the same anyway, so make is a symlink
-rwxr-xr-xcreate-fhs-dirs8
-rw-r--r--fhs-dirs.morph1
2 files changed, 7 insertions, 2 deletions
diff --git a/create-fhs-dirs b/create-fhs-dirs
index fdab461..953d84a 100755
--- a/create-fhs-dirs
+++ b/create-fhs-dirs
@@ -78,7 +78,6 @@ var/cache
var/lib
var/lock
var/log
-var/run
var/spool
var/tmp
"
@@ -88,6 +87,13 @@ do
install -d -o "$owner" -g "$group" -m "$perms" "$target/$dirname"
done
+while read link name; do
+ ln -s "$link" "$target/$name"
+done <<EOF
+/run /var/run
+/proc/mounts /etc/mtab
+EOF
+
# Fix permissions and ownerships for some special cases.
chown "$owner:$group" "$target/."
chmod "$perms" "$target/."
diff --git a/fhs-dirs.morph b/fhs-dirs.morph
index 533c68a..a954979 100644
--- a/fhs-dirs.morph
+++ b/fhs-dirs.morph
@@ -12,7 +12,6 @@
"install -d \"$DESTDIR/etc/init.d\"",
"install -m 744 rcS \"$DESTDIR/etc/rcS\"",
"install -m 644 ld.so.conf \"$DESTDIR/etc/ld.so.conf\"",
- "ln -s /proc/mounts \"$DESTDIR\"/etc/mtab",
"echo baserock > \"$DESTDIR\"/etc/hostname"
]
}