Detecting compressed devices doesn't work properly. fixed to dev/zram0 for now
This commit is contained in:
parent
9509640c65
commit
347af78b46
4
packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization
Executable file → Normal file
4
packages/bsp/common/usr/lib/armbian/armbian-hardware-optimization
Executable file → Normal file
@ -43,7 +43,9 @@ prepare_board() {
|
||||
|
||||
# prevent logrotate from compressing rotated logs when /var/log lives on compressed fs
|
||||
CheckDevice=$(for i in /var/log /var / ; do findmnt -n -o SOURCE $i && break ; done)
|
||||
[ -n "${CheckDevice}" ] && grep "^${CheckDevice}" /etc/mtab | grep -q compress && \
|
||||
#[ -n "${CheckDevice}" ] && grep "^${CheckDevice}" /etc/mtab | grep -q compress && \
|
||||
# need better implemenation, now fixed to our zram0
|
||||
[[ "${CheckDevice}" == "/dev/zram0" ]] &&
|
||||
for ConfigFile in /etc/logrotate.d/* ; do
|
||||
sed -i -e "s/^\s\+compress/\t# compress/" \
|
||||
-e "s/^\s\+delaycompress/\t# delaycompress/" "${ConfigFile}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user