>>>>> On Thu, 17 Oct 2019 10:35:24 +0000, Matteo Guglielmi
>>>>> <[email protected]> said:
> For those interested,
> the final and working patch that takes care of all possible
> cases is the following one:
> _ls=$(realpath -m $_ls) # insert these two lines before
> _ls=$target/${_ls#/target/} # line n.36 (info=$(file $_ls))
> info=$(file $_ls)
Sorry, this does not work on Debian systems :-(
Here's some debugging output.
+ '[' -f /srv/fai/nfsroot/bin/ls ']'
+ _ls=/srv/fai/nfsroot/bin/ls
++ realpath -m /srv/fai/nfsroot/bin/ls
+ _ls=/srv/fai/nfsroot/usr/bin/ls
+ _ls=/srv/fai/nfsroot//srv/fai/nfsroot/usr/bin/ls
++ file /srv/fai/nfsroot//srv/fai/nfsroot/usr/bin/ls
+ info='/srv/fai/nfsroot//srv/fai/nfsroot/usr/bin/ls: cannot open
`/srv/fai/nfsroot//srv/fai/nfsroot/usr/bin/ls'\'' (No such file or directory)'
I works when using this lines. Does this work for you with SUSE?
_ls=$(realpath -m $_ls)
_ls=$target/${_ls#$target}
--
regards Thomas