summaryrefslogtreecommitdiffstats
path: root/openpower/scripts
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2015-09-17 18:39:55 +0800
committerJeremy Kerr <jk@ozlabs.org>2015-09-18 14:57:33 +0800
commitaf3fa308e4e0bea8287f0ff6cd1c1b009d839542 (patch)
treee20b2242aa61816ef59a885608751ba8d8110ef9 /openpower/scripts
parentf96808c52136612c75819b9ba92f70bdb5b3d742 (diff)
downloadblackbird-op-build-af3fa308e4e0bea8287f0ff6cd1c1b009d839542.tar.gz
blackbird-op-build-af3fa308e4e0bea8287f0ff6cd1c1b009d839542.zip
target: Don't symlink outside of /var
We will want to share /var with petitboot plugins, but most of the directories in /var are actually symlinks to outside of var (to /tmp). This change replaces the symlinks with actual directories. Since we're running in an initramfs, we don't need to put everything in /tmp. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'openpower/scripts')
-rwxr-xr-xopenpower/scripts/fixup-target-var12
1 files changed, 12 insertions, 0 deletions
diff --git a/openpower/scripts/fixup-target-var b/openpower/scripts/fixup-target-var
new file mode 100755
index 00000000..171b9161
--- /dev/null
+++ b/openpower/scripts/fixup-target-var
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# replace /var/* symlinks with actual directories
+
+find $TARGET_DIR/var/ -type l |
+while read path
+do
+ target=$(realpath $path)
+ [ -d "$target" ] || continue
+ rm $path
+ mkdir $path
+done
OpenPOWER on IntegriCloud