From 25747dc44178d2ebd6f37d4c78fc05368c482496 Mon Sep 17 00:00:00 2001 From: David Personette Date: Sun, 28 Feb 2016 10:07:53 -0500 Subject: [PATCH] samba.sh add read-only check to timezone --- samba.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samba.sh b/samba.sh index 316ff74..7436755 100755 --- a/samba.sh +++ b/samba.sh @@ -65,7 +65,7 @@ timezone() { local timezone="${1:-EST5EDT}" return } - if [[ $(cat /etc/timezone) != $timezone ]]; then + if [[ -w /etc/timezone && $(cat /etc/timezone) != $timezone ]]; then echo "$timezone" >/etc/timezone ln -sf /usr/share/zoneinfo/$timezone /etc/localtime dpkg-reconfigure -f noninteractive tzdata >/dev/null 2>&1