Re: [PATCH] Add new file to export the common functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/13/15 at 01:44pm, Harald Hoyer wrote:
> On 29.10.2015 07:04, Minfei Huang wrote:
> > Hi, Harald.
> > 
> > Ping. Do you have any feedback about this patch?
> > 
> > Thanks
> > Minfei
> 
> cleaned up dracut-functions.sh and moved dracut specific functions to
> dracut-inist.sh

Hi, Harald.

The dracut exported lib dracut-functions.sh still cann't be sourced
directly by third-party project, due to undefined variable initdir.

Could you please help move following code to dracut-init.sh as well?

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


Thanks
Minfei
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux