Project

General

Profile

Actions

Bug #3781

closed

ksh93's builtin ln inconsistent

Added by Garrett D'Amore over 8 years ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
cmd - userland programs
Start date:
2013-05-22
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

I found cases where -f is not honored properly with ksh. I can't figure out why.

Processing ksh-overrides: ./src/scripts/mk-dist2101: process_pkgs1128: process_pkg732: process_pkg_line685: pkg_directive_link409: ln: ../../sbin/sh: cannot link to /tmp/DEYOS.out/mnt/usr/bin/sh [File exists]

The source for this routine looks like this:

${X_LN} -sf "$1" "$2" || die "ln -sf $1 $2"

Notably, X_LN evaluates to "ln".

In my script, I was able to workaround this like this:

${X_LN} -sf "$1" "$2" 2> /dev/null || \\
${E}/usr/bin/ln -sf "$1" "$2" || die "ln -sf $1 $2"

This is key, because I don't want to always execute the ln -- this script does a lot of these and it takes too long if I have to shell out all the time.

This similar to 3779.

Actions

Also available in: Atom PDF