Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
kiwi
:
Appliance
>
dracut
> 0075-move-ln_r-to-dracut-init.sh.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0075-move-ln_r-to-dracut-init.sh.patch of Package dracut
From dd1f768b2883425e3d78de49aadfc230a43b0aed Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Mon, 2 May 2016 12:48:12 +0200 Subject: [PATCH] move ln_r() to dracut-init.sh --- dracut-functions.sh | 12 ------------ dracut-init.sh | 13 +++++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/dracut-functions.sh b/dracut-functions.sh index c7ea9f58..4496bfe6 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -167,18 +167,6 @@ convert_abs_rel() { printf "%s\n" "$__newpath" } -if [[ "$(ln --help)" == *--relative* ]]; then - ln_r() { - ln -sfnr "${initdir}/$1" "${initdir}/$2" - } -else - ln_r() { - local _source=$1 - local _dest=$2 - [[ -d "${_dest%/*}" ]] && _dest=$(readlink -f "${_dest%/*}")/${_dest##*/} - ln -sfn -- "$(convert_abs_rel "${_dest}" "${_source}")" "${initdir}/${_dest}" - } -fi # get_fs_env <device> # Get and the ID_FS_TYPE variable from udev for a device. diff --git a/dracut-init.sh b/dracut-init.sh index a195c32b..d2bb8457 100644 --- a/dracut-init.sh +++ b/dracut-init.sh @@ -997,3 +997,16 @@ instmods() { [[ "$optional" ]] && return 0 return $_ret } + +if [[ "$(ln --help)" == *--relative* ]]; then + ln_r() { + ln -sfnr "${initdir}/$1" "${initdir}/$2" + } +else + ln_r() { + local _source=$1 + local _dest=$2 + [[ -d "${_dest%/*}" ]] && _dest=$(readlink -f "${_dest%/*}")/${_dest##*/} + ln -sfn -- "$(convert_abs_rel "${_dest}" "${_source}")" "${initdir}/${_dest}" + } +fi