summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2015-05-22 13:26:52 +0200
committerJonas Smedegaard <dr@jones.dk>2015-05-22 13:26:52 +0200
commitf282ddb35bc9c01e24053998263d2fe4c931afac (patch)
treedcbcb8a4227b5e5b336250c984bf088543f8a7c6
parenteb19c7d8cd72567bb5cecaabdb976d911cbcf7b0 (diff)
Fix drop $ from arithmetic variables.
-rwxr-xr-xlocalnotifypwexp8
1 files changed, 4 insertions, 4 deletions
diff --git a/localnotifypwexp b/localnotifypwexp
index 3f24c33..a485b12 100755
--- a/localnotifypwexp
+++ b/localnotifypwexp
@@ -63,7 +63,7 @@ epochseconds="+%s"
dateformat="" # blank for GNU when epochseconds="+%s"
secondsperday=86400 # set this to 1 for no division
-today=$(($($dateprog $useUTC $epochseconds $dateformat)/$secondsperday))
+today=$(($($dateprog $useUTC $epochseconds $dateformat)/secondsperday))
oIFS=$IFS
# ### END SETUP ###
@@ -73,7 +73,7 @@ oIFS=$IFS
# use single quotes around templates, backslash escapes and substitutions
# will be evaluated upon output
usersubjecttemplate='Your password is expiring soon'
-userbodytemplate='Your password on $hostname expires in $(($expdate - $today)) days.
+userbodytemplate='Your password on $hostname expires in $((expdate - today)) days.
More help is available at http://support.$domainname/password'
@@ -117,9 +117,9 @@ do
lastchange=${usershadow[$last]}
warndays=${usershadow[$warn]:-$warndefault}
- expdate=$(($lastchange + $mustchange))
+ expdate=$((lastchange + mustchange))
- threshhold=$(($today + $warndays + $weekmode))
+ threshhold=$((today + warndays + weekmode))
if [[ $expdate -lt $threshhold ]];
then