diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2015-09-17 18:39:55 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2015-09-18 14:57:33 +0800 |
commit | af3fa308e4e0bea8287f0ff6cd1c1b009d839542 (patch) | |
tree | e20b2242aa61816ef59a885608751ba8d8110ef9 /openpower/scripts | |
parent | f96808c52136612c75819b9ba92f70bdb5b3d742 (diff) | |
download | blackbird-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-x | openpower/scripts/fixup-target-var | 12 |
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 |