From 7aa75691a793577a1a46a621a8cb7d23388b1e3c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 Sep 2014 13:39:49 +0100 Subject: [PATCH] Avoid duplicates --- install-freedombone.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install-freedombone.sh b/install-freedombone.sh index 837cbd1b..c33d73f3 100755 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -194,7 +194,9 @@ function enable_zram { if grep -Fxq "enable_zram" $COMPLETION_FILE; then return fi - echo "options zram num_devices=1" >> /etc/modprobe.d/zram.conf + if ! grep -q "options zram num_devices=1" /etc/modprobe.d/zram.conf; then + echo 'options zram num_devices=1' >> /etc/modprobe.d/zram.conf + fi echo '#!/bin/bash' > /etc/init.d/zram echo '### BEGIN INIT INFO' >> /etc/init.d/zram echo '# Provides: zram' >> /etc/init.d/zram