diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-11-29 17:32:48 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-11-29 17:32:48 +0000 |
commit | 98ef7bf156902ba8e9b1dde10872a5acacbe0dc6 (patch) | |
tree | be21484c9c569c757043e2465c5b81bf0caf0c21 /etc/rc | |
parent | 3b6e12c4022d634638b8223801f96be2916aac04 (diff) | |
download | pfsense-98ef7bf156902ba8e9b1dde10872a5acacbe0dc6.zip pfsense-98ef7bf156902ba8e9b1dde10872a5acacbe0dc6.tar.gz |
Correctly check that an item is a symlink before blowing it away and recreating.
Diffstat (limited to 'etc/rc')
-rwxr-xr-x | etc/rc | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |