Hi Sean,
We've got an Extension Attribute that returns MUD sizes. Ran into the same problem. The output is a nearly non-readable blob for our techs and analysts....
CURRENT RESULT:
jdoe 23M /Users/jdoe/Documents/Microsoft User Data/Office 2008 Identities/Main Identity/Database<BR>asmith 258M /Users/asmith/Documents/Microsoft User Data/Office 2004 Identities/asmith/Database<BR>bjones 21M /Users/bjones/Documents/Microsoft User Data/Office 2008 Identities/Main Identity/Database
DESIRED RESULT:
jdoe 23M /Users/jdoe/Documents/Microsoft User Data/Office 2008 Identities/Main Identity/Database
asmith 258M /Users/asmith/Documents/Microsoft User Data/Office 2004 Identities/asmith/Database
bjones 21M /Users/bjones/Documents/Microsoft User Data/Office 2008 Identities/Main Identity/Database
We reported this to JAMF about a year or so ago, but I'll ping them to support your bug report. Extension Attributes are incredibly useful (best thing since dummy receipts!) and as our techs and analysts rely more and more on this kind of inventory data, it gets more and more crucial to get the <BR> issue resolved.
Don
sed -e 's/XD-0405-U/Intuos2 A6/g' |
sed -e 's/XD-0405-R/Intuos2 A6/g' |
sed -e 's/XD-0608-U/Intuos2 A5/g' |
sed -e 's/XD-0608-R/Intuos2 A5/g' |
sed -e 's/XD-0912-U/Intuos2 A4/g' |
Sean,
Where did you find these to list them out?
My list came from a couple of sources. Some would be tablets we already had and others were I think probably from wacoms website. Do you think they are wrong?
Think I may have pulled the model codes from:
http://www.wacom-asia.com/download/manuals/index.html
Once again Sean is the sed wizard, thanks again for the display output attribute!
I can't give you free gear but I'll gladly give you a Columbia Sportswear employee pass, contact me off board and we can exchange info! Twitter feed URL is in profile.
I will add this to our attribute list tomorrow!
If you haven't seen it in one of the most recent JAMF Nation digests Sean updated a separate thread with a fix, posting this here for archive purposes and for any new comers.
For anyone that hasn't noticed yet, the new wacom tablet reports the correct name, so no need to amend my EA script to do more replacements. However, the grep for wacom now comes up with a false positive. Easy fix, just change the line:
system_profiler SPUSBDataType | grep -B 3 -i wacom | awk 'NR%5==1' |
to read:
system_profiler SPUSBDataType | grep -B 3 WACOM | awk 'NR%5==1' |
Sean
Hmm with casper 8.43 this worked, After I got 8.51 loaded this is now broken.
/private/tmp/extensionAttributeScript: line 7: : command not found
Hello everyone, resurrecting a very old thread...
I was wondering if any kind soul had an updated script/extension attribute to collect Wacom tablets on inventory.
I could not find anything related on Jamf Nation
I have tried the above but does not seem to work on 10.13.6
Many thanks and have a great weekend everyone!
Carlo
@carlo.anselmi I didn't look at the whole thread, but the one a few comments above by @adthree still works for me in 10.13.6:
#!/bin/sh
system_profiler SPUSBDataType | grep -B3 -i wacom | awk 'NR%5==1'
I left off the pipe (|) and backslash () at the end of that as I ran that command independently. Those are needed if you are continuing the command onto another line.
For me, this resulted in an output of
Intuos PS:
Version: 1.00
You'd have to echo that result to fill in the extension attribute, of course.
You know, I don't have this in my environment but I might just implement it.
I've looked over @sean's stuff.
He is obviously (was obviously) working with computers that had multiple tablets connected and he needed to know which tablets were on which computer.
Where I am, that is definitely not an issue for me.
As such, a simpler EA could just be to return True or False if a tablet is connected.
#!/bin/bash
result="False"
# If the result of this command is not null (-n), then a Wacom tablet was found.
if [[ -n "$(system_profiler SPUSBDataType | grep -i wacom)" ]]; then
result="True"
fi
echo "<result>$result</result>
If you need the model name, you could do something like this:
#!/bin/bash
result="No tablet connected"
# Get the USB data from system_profiler, then search (regex) for Wacom. Grab the first entry (head -1) and remove the leading whitespace and trailing colon (2 sed commands).
result="$(system_profiler SPUSBDataType | grep -B3 -i wacom | head -1 | sed "s/^[ ]*// | sed "s/:$//")"
echo "<result>$result</result>"
Alternatively, possibly to address Sean's initial workflow, you could get additional models.
NOTE: I haven't tested this on an actual machine, just in simulated input.
#!/bin/bash
result="No tablet connected"
# Get the USB data from system_profiler, then search (regex) for Wacom. Grab the first line of each entry (2 awk commands) and remove the leading whitespace and trailing colon (2 sed commands).
# The first awk is based on Sean's script. The output is broken down into 5 line chunks and he is pulling the first line of those chunks.
# That gives you the model name and version number per each device connected.
# The second awk gives you just the model name per each device connected. (2 line chunks getting the first line of each).
result="$(system_profiler SPUSBDataType | grep -B3 -i wacom | awk 'NR%5==1' | awk 'NR%2==1' | sed "s/^[ ]*//" | sed "s/:$//")"
echo "<result>$result</result>"
@jrippy
Awesome! Where can I send you some beer? :-)
I am testing the last script and it reports back the commercial name and/or model (like CTL-something) correctly
Waiting for all clients to run recon, so far I have only a couple of machines I need to manually double check since the result is
Current Required (mA): 20 Serial Number: ############
(#s above are numbers)
Anyway, thank you again!
Have a great weekend everyone
Carlo
EDIT: maybe those are "false positive" and just external USB drives?
I'm still using this with hosted 10.7.1, works fine as best I can tell:
#!/bin/sh
# updated to take advantage of less than operator when reporting integer as result instead of string
# but that didn't work since the value reports with two decimal points and a hyphen, i.e. "6.3.27-2"
version=$(/usr/bin/defaults read /Library/PreferencePanes/WacomTablet.prefpane/Contents/Info.plist CFBundleShortVersionString | sed 's/Wacom v//g')
echo "<result>$version</result>"
@carlo.anselmi It could be that some of those are wireless adapters for tablets, perhaps?
Some of the numbers with awk might need to be adjusted. Take the command and just remove the pipes and extra commands after the grep statement and you can see what the full output would be, then maybe adjust accordingly.
@pete_c That works great if the software is installed (and it should be). I have noticed these tablets still work as input devices without software as well. I guess it depends on the needs for the EA. You could theoretically scope the software install based on the EA output so you might want the output from system_profiler.
But if you guarantee that the software is installed, that should be awesome and easier.
@jrippy and @pete_c and @sean
many thanks indeed, sorry for the delay in getting back
Putting all together now I can collect the tablet model name with
#!/bin/bash
result="No tablet connected"
# Get the USB data from system_profiler, then search (regex) for Wacom. Grab the first line of each entry (2 awk commands) and remove the leading whitespace and trailing colon (2 sed commands).
# The first awk is based on Sean's script. The output is broken down into 5 line chunks and he is pulling the first line of those chunks.
# That gives you the model name and version number per each device connected.
# The second awk gives you just the model name per each device connected. (2 line chunks getting the first line of each).
result="$(system_profiler SPUSBDataType | grep -B3 -i wacom | awk 'NR%5==1' | awk 'NR%2==1' | sed "s/^[ ]*//" | sed "s/:$//")"
echo "<result>$result</result>"
Then the model identifier (code name) with
#!/bin/bash
echo -n "<result>"
system_profiler SPUSBDataType | grep -B 3 -i wacom | sed -e 's/^[ ]*//' | awk 'NR%5==1' |
#sed -e 's/USB Bus://' |
#sed -e 's/USB High-Speed Bus://' |
sed -e 's/XD-0405-U/Intuos2 A6/g' |
sed -e 's/XD-0405-R/Intuos2 A6/g' |
sed -e 's/XD-0608-U/Intuos2 A5/g' |
sed -e 's/XD-0608-R/Intuos2 A5/g' |
sed -e 's/XD-0912-U/Intuos2 A4/g' |
sed -e 's/XD-0912-R/Intuos2 A4/g' |
sed -e 's/XD-1212-U/Intuos2 A4 Oversize/g' |
sed -e 's/XD-1212-R/Intuos2 A4 Oversize/g' |
sed -e 's/XD-1218-U/Intuos2 A3/g' |
sed -e 's/XD-1218-R/Intuos2 A3/g' |
sed -e 's/PTZ-430/Intuos3 A6/g' |
sed -e 's/PTZ-431W/Intuos3 A6 Wide/g' |
sed -e 's/PTZ-630/Intuos3 A5/g' |
sed -e 's/PTZ-631W/Intuos3 A5 Wide/g' |
sed -e 's/PTZ-930/Intuos3 A4/g' |
sed -e 's/PTZ-1230/Intuos3 A4 Oversize/g' |
sed -e 's/PTK-440/Intuos4 S/g' |
sed -e 's/PTK-640/Intuos4 M/g' |
sed -e 's/PTK-840/Intuos4 L/g' |
sed -e 's/PTK-1240/Intuos4 XL/g' |
sed -e 's/PTK-450/Intuos5 touch Small/g' |
sed -e 's/PTH-650/Intuos5 touch Medium/g' |
sed -e 's/PTH-850/Intuos5 touch Large/g' |
sed -e 's/CTH-460/Bamboo Pen&Touch/g' |
sed -e 's/CTH-461/Bamboo Craft/g' |
sed -e 's/CTH-661/Bamboo Fun Pen&Touch/g' |
sed -e 's/CTL-470/Bamboo Connect/g' |
sed -e 's/CTL-471/Bamboo Splash/g' |
sed -e 's/CTH-470/Bamboo Capture/g' |
sed -e 's/CTH-670/Bamboo Create/g' |
sed -e 's/DTZ-1200W/Cintiq-12WX Intuos3/g' |
sed -e 's/DTZ-2100/Cintiq-21UX Intuos3/g' |
sed -e 's/DTK-1200W/Cintiq-12WX Intuos4/g' |
sed -e 's/DTK-2100/Cintiq-21UX Intuos4/g' |
sed -e '/^$/d' |
sed -e 's/(.*)./1/'
echo "</result>"
and the driver version with
#!/bin/sh
# updated to take advantage of less than operator when reporting integer as result instead of string
# but that didn't work since the value reports with two decimal points and a hyphen, i.e. "6.3.27-2"
version=$(/usr/bin/defaults read /Library/PreferencePanes/WacomTablet.prefpane/Contents/Info.plist CFBundleShortVersionString | sed 's/Wacom v//g')
echo "<result>$version</result>"