diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-11-29 17:32:42 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-11-29 17:32:42 +0000 |
commit | 0a9da6b5ff3d36035895f9f0bea8e2b773be7e3f (patch) | |
tree | c4f86e34f7a9c3af0fd12f3a61af6383a3b7d29f /etc/rc | |
parent | c366571603e6fd92846207340d797eb2ec9a898b (diff) | |
download | pfsense-0a9da6b5ff3d36035895f9f0bea8e2b773be7e3f.zip pfsense-0a9da6b5ff3d36035895f9f0bea8e2b773be7e3f.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 |