From df4c7b25047fe1abc84877aea2aed0ac8e5a4f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Verstraeten?= Date: Wed, 2 Aug 2017 10:48:30 +0200 Subject: [PATCH] replace var --- 70_installation/3_Raspbian.md | 3 ++- 70_installation/4_Armbian.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/70_installation/3_Raspbian.md b/70_installation/3_Raspbian.md index f5596c7..8f8ad6c 100644 --- a/70_installation/3_Raspbian.md +++ b/70_installation/3_Raspbian.md @@ -143,10 +143,11 @@ Create a bash script and copy following script. Copy following script (make sure the partition is correct, this is the default one for a Raspberry Pi). partition=/dev/mmcblk0p1 + imagedir=/etc/opt/kerberosio/capture/ if [[ $(df -h | grep $partition | head -1 | awk -F' ' '{ print $5/1 }' | tr ['%'] ["0"]) -gt 90 ]]; then echo "Cleaning disk" - find /etc/opt/kerberosio/capture/ -type f | sort | head -n 100 | xargs -r rm -rf; + find $imagedir -type f | sort | head -n 100 | xargs -r rm -rf; fi; Make the script executable. diff --git a/70_installation/4_Armbian.md b/70_installation/4_Armbian.md index 11d12a5..40e974b 100644 --- a/70_installation/4_Armbian.md +++ b/70_installation/4_Armbian.md @@ -135,10 +135,11 @@ Create a bash script and copy following script. Copy following script (make sure the partition is correct, this is the default one for a Raspberry Pi). partition=/dev/mmcblk0p1 + imagedir=/etc/opt/kerberosio/capture/ if [[ $(df -h | grep $partition | head -1 | awk -F' ' '{ print $5/1 }' | tr ['%'] ["0"]) -gt 90 ]]; then echo "Cleaning disk" - find /etc/opt/kerberosio/capture/ -type f | sort | head -n 100 | xargs -r rm -rf; + find $imagedir -type f | sort | head -n 100 | xargs -r rm -rf; fi; Make the script executable.