summaryrefslogtreecommitdiff
path: root/dracut-functions
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2010-10-28 13:35:17 +0200
committerHarald Hoyer <harald@redhat.com>2010-10-28 17:11:34 +0200
commit11adeb7c011a8f17632847dbef3441136cb422a7 (patch)
tree282effc7ee0905e2e0d0c8409118fcc82a5cd61d /dracut-functions
parent3afca618da34a7363a1a4763488e87c2ab157386 (diff)
downloaddracut-11adeb7c011a8f17632847dbef3441136cb422a7.tar.gz
dracut-11adeb7c011a8f17632847dbef3441136cb422a7.tar.bz2
dracut-11adeb7c011a8f17632847dbef3441136cb422a7.zip
dracut-functions:inst_symlink() create target dir
if the target directory of the symlink didn't exist, we failed
Diffstat (limited to 'dracut-functions')
-rwxr-xr-xdracut-functions3
1 files changed, 2 insertions, 1 deletions
diff --git a/dracut-functions b/dracut-functions
index 8a1f55fc..7c41fe75 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -379,7 +379,8 @@ inst_symlink() {
[[ -L $target ]] && return 0
realsrc=$(readlink -f "$src")
[[ $realsrc = ${realsrc##*/} ]] && realsrc=${src%/*}/$realsrc
- inst "$realsrc" && ln -s "$realsrc" "$target"
+ inst "$realsrc" && mkdir -p "${target%/*}" && \
+ ln -s "$realsrc" "$target"
}
# find a udev rule in the usual places.