Typo in variable Workgroup - fml
[einar-bin] / addfollowmeprint.sh
index 23edde8ed7bf2bb03c3ae928533e2eecd84f039e..d4352896fb27d65ba8cb5e060f312a1b7cd364fb 100755 (executable)
@@ -240,6 +240,7 @@ if [ "${Uname}" = "darwin" ]; then
     printerror "This script must be broken or outdated. Please contact orakel@ntnu.no for further assistance."
     exit 1
   fi
     printerror "This script must be broken or outdated. Please contact orakel@ntnu.no for further assistance."
     exit 1
   fi
+fi
 
 # Finally we can add the printer
 
 
 # Finally we can add the printer
 
@@ -267,7 +268,7 @@ if [ "${Uname}" = "darwin" ]; then
   # Add credentials to the keychain if they are missing
   # Shamelessly stolen from https://github.com/Orakeltjenesten/scripts/blob/33abfb353524f449f0bbdee27adb2f1f0a9756a2/print/ntnuprint-mac.sh
   if ! security find-internet-password -s ${PrintServer} >/dev/null 2>&1; then
   # Add credentials to the keychain if they are missing
   # Shamelessly stolen from https://github.com/Orakeltjenesten/scripts/blob/33abfb353524f449f0bbdee27adb2f1f0a9756a2/print/ntnuprint-mac.sh
   if ! security find-internet-password -s ${PrintServer} >/dev/null 2>&1; then
-    security -v add-internet-password -a "${WorkGroup}\\${Username}" -s ${PrintServer} \
+    security -v add-internet-password -a "${Workgroup}\\${Username}" -s ${PrintServer} \
      -w "${Password}" -D "Network Password" -r "smb " -l "${QueueName}" \
      -T /System/Library/CoreServices/NetAuthAgent.app -T 'group://NetAuth' \
      -T /System/Library/CoreServices/NetAuthAgent.app/Contents/MacOS/NetAuthSysAgent >/dev/null 2>&1
      -w "${Password}" -D "Network Password" -r "smb " -l "${QueueName}" \
      -T /System/Library/CoreServices/NetAuthAgent.app -T 'group://NetAuth' \
      -T /System/Library/CoreServices/NetAuthAgent.app/Contents/MacOS/NetAuthSysAgent >/dev/null 2>&1