Merge pull request #1319 from droscy/fix-loghdd-replacement
Change regex match from 'log/' to '/log/' in armbian-hardware-optimization
This commit is contained in:
commit
b5edf5b443
@ -44,11 +44,11 @@ prepare_board() {
|
||||
CheckDevice=$(for i in /var/log /var / ; do findmnt -n -o SOURCE $i && break ; done)
|
||||
# adjust logrotate configs
|
||||
if [[ "${CheckDevice}" == "/dev/zram0" || "${CheckDevice}" == "armbian-ramlog" ]]; then
|
||||
for ConfigFile in /etc/logrotate.d/* ; do sed -i -e "s/log\//log.hdd\//" "${ConfigFile}"; done
|
||||
sed -i "s/log\//log.hdd\//" /etc/logrotate.conf
|
||||
for ConfigFile in /etc/logrotate.d/* ; do sed -i -e "s/\/log\//\/log.hdd\//g" "${ConfigFile}"; done
|
||||
sed -i "s/\/log\//\/log.hdd\//g" /etc/logrotate.conf
|
||||
else
|
||||
for ConfigFile in /etc/logrotate.d/* ; do sed -i -e "s/\/log.hdd\//\/log\//" "${ConfigFile}"; done
|
||||
sed -i "s/\/log.hdd\//\/log\//" /etc/logrotate.conf
|
||||
for ConfigFile in /etc/logrotate.d/* ; do sed -i -e "s/\/log.hdd\//\/log\//g" "${ConfigFile}"; done
|
||||
sed -i "s/\/log.hdd\//\/log\//g" /etc/logrotate.conf
|
||||
fi
|
||||
|
||||
# unlock cpuinfo_cur_freq to be accesible by a normal user
|
||||
|
||||
Loading…
Reference in New Issue
Block a user