|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
#!/bin/sh |
|
|
|
|
# |
|
|
|
|
# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) |
|
|
|
|
# 2013 Steven Armstrong (steven-cdist at armstrong.cc) |
|
|
|
|
# 2013-2014 Steven Armstrong (steven-cdist at armstrong.cc) |
|
|
|
|
# |
|
|
|
|
# This file is part of cdist. |
|
|
|
|
# |
|
|
|
@ -18,9 +18,6 @@ |
|
|
|
|
# You should have received a copy of the GNU General Public License |
|
|
|
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>. |
|
|
|
|
# |
|
|
|
|
# |
|
|
|
|
# Mostly a wrapper for ln |
|
|
|
|
# |
|
|
|
|
|
|
|
|
|
destination="/$__object_id" |
|
|
|
|
|
|
|
|
@ -55,6 +52,10 @@ rm -rf "$destination" |
|
|
|
|
DONE |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if [ "$state_is" = "wrongsource" ]; then |
|
|
|
|
printf 'rm -f "%s"\n' "$destination" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
# create our link |
|
|
|
|
cat << DONE |
|
|
|
|
ln ${lnopt} -f "$source" "$destination" |
|
|
|
|