diff options
Diffstat (limited to 'utils/update-alternatives.in')
-rw-r--r-- | utils/update-alternatives.in | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/utils/update-alternatives.in b/utils/update-alternatives.in index 34d89f1..2a6f6cc 100644 --- a/utils/update-alternatives.in +++ b/utils/update-alternatives.in @@ -113,14 +113,7 @@ find_best_alt() { if [ ! -d $link_dir ]; then mkdir -p $link_dir fi - if [ -h $link -a -d $link ]; then - # If $link exists and the target is a directory, - # 'ln -sf $path $link' doesn't replace the link to - # that directory, it creates new link inside. - echo "update-alternatives: Removing $link". - rm -f $link - fi - ln -sf $path $link + ln -snf $path $link echo "update-alternatives: Linking $link to $path" else echo "update-alternatives: Error: not linking $link to $path since $link exists and is not a link" |