diff options
author | Renato Botelho <renato@netgate.com> | 2016-11-21 14:05:01 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-11-21 14:06:16 -0200 |
commit | fc84b222e75c9d92e394a2e9ddb80c5ead382f52 (patch) | |
tree | 6d6882e1f9de2c725bf2f6894cce8c904990a839 /src/etc/pfSense-rc | |
parent | a5dd605a246065e480b3b05c47da8e5aee1885e3 (diff) | |
download | pfsense-fc84b222e75c9d92e394a2e9ddb80c5ead382f52.zip pfsense-fc84b222e75c9d92e394a2e9ddb80c5ead382f52.tar.gz |
Remove config files symlinks from /etc to /var/etc. Fixes #5538
Diffstat (limited to 'src/etc/pfSense-rc')
-rwxr-xr-x | src/etc/pfSense-rc | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/src/etc/pfSense-rc b/src/etc/pfSense-rc index 38c8894..afa2a93 100755 --- a/src/etc/pfSense-rc +++ b/src/etc/pfSense-rc @@ -219,31 +219,15 @@ if [ -L /usr/local/etc/strongswan.conf ]; then rm -f /usr/local/etc/strongswan.conf fi -echo -n "Creating symlinks..." -# Repair symlinks if they are broken -if [ ! -L /etc/syslog.conf ]; then - /bin/rm -rf /etc/syslog.conf - if [ ! -f /var/etc/syslog.conf ]; then - touch /var/etc/syslog.conf +# Remove deprecated symlinks - #5538 +for f in /etc/hosts \ + /etc/resolv.conf \ + /etc/resolvconf.conf \ + /etc/syslog.conf; do + if [ -L "${f}" ]; then + rm -f ${f} fi - /bin/ln -s /var/etc/syslog.conf /etc/syslog.conf -fi - -# Repair symlinks if they are broken -if [ ! -L /etc/hosts ]; then - /bin/rm -rf /etc/hosts - /bin/ln -s /var/etc/hosts /etc/hosts -fi - -if [ ! -L /etc/resolv.conf ]; then - /bin/rm -rf /etc/resolv.conf - /bin/ln -s /var/etc/resolv.conf /etc/resolv.conf -fi - -if [ ! -L /etc/resolvconf.conf ]; then - /bin/rm -rf /etc/resolvconf.conf - /bin/ln -s /var/etc/resolvconf.conf /etc/resolvconf.conf -fi +done # Setup compatibility link for packages that # have trouble overriding the PREFIX configure |