From 98ef7bf156902ba8e9b1dde10872a5acacbe0dc6 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 29 Nov 2007 17:32:48 +0000 Subject: Correctly check that an item is a symlink before blowing it away and recreating. --- etc/rc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/etc/rc b/etc/rc index 66ce433..f128941 100755 --- a/etc/rc +++ b/etc/rc @@ -56,8 +56,11 @@ if [ ! "$PLATFORM" = "cdrom" ] ; then # If /conf is a directory, convert it to a symlink # to /cf/conf if [ -d "/conf" ]; then - rm -rf /conf - ln -s /cf/conf /conf + # If item is not a symlink then rm and recreate + if ! test -L /conf; then + rm -rf /conf + ln -s /cf/conf /conf + fi fi fi -- cgit v1.1