View | Details | Raw Unified | Return to bug 25621
Collapse All | Expand All

(-)alternatives-0.4.3.orig/alternatives-update (-1 / +4 lines)
Lines 72-78 Link Here
72
#    echo "remove_alternative:$1"
72
#    echo "remove_alternative:$1"
73
    from=$1
73
    from=$1
74
    int_link=$(echo $from|alternatives_encode)
74
    int_link=$(echo $from|alternatives_encode)
75
    [ -h $fake_dir/$from ] && rm -f $fake_dir/$from #remove external only if it is symlink
75
    if [ -h $fake_dir/$from ]; then
76
	#remove external only if it is alternatives symlink
77
	readlink "$fake_dir/$from" | grep -q '^/etc/alternatives/links/' && rm -f "$fake_dir/$from"
78
    fi
76
    rm -f "$links_dir/$int_link" #always remove internal links
79
    rm -f "$links_dir/$int_link" #always remove internal links
77
}
80
}
78
81

Return to bug 25621