|
@@ -194,7 +194,9 @@ function enable_zram {
|
194
|
194
|
if grep -Fxq "enable_zram" $COMPLETION_FILE; then
|
195
|
195
|
return
|
196
|
196
|
fi
|
197
|
|
- echo "options zram num_devices=1" >> /etc/modprobe.d/zram.conf
|
|
197
|
+ if ! grep -q "options zram num_devices=1" /etc/modprobe.d/zram.conf; then
|
|
198
|
+ echo 'options zram num_devices=1' >> /etc/modprobe.d/zram.conf
|
|
199
|
+ fi
|
198
|
200
|
echo '#!/bin/bash' > /etc/init.d/zram
|
199
|
201
|
echo '### BEGIN INIT INFO' >> /etc/init.d/zram
|
200
|
202
|
echo '# Provides: zram' >> /etc/init.d/zram
|