For a long time, we used the bless command to startup systems to a specific volume in OS X. Back in 2009 I started using the systemsetup command for more and more tasks. These days, I’m being guided to replace all of my bless options in scripts to systemsetup. The easy way to configure your startup volumes using systemsetup is to list the available volumes, set one as the startup volume and then check to see which one is the current volume. The first task is to list the available startup volumes, using the -liststartupdisks option: sudo systemsetup -liststartupdisks You can then set the disk as one that was listed…
-
-
Locate the UUID of a SAN
You can use the UUID of a SAN MDC in Xsan to perform a lot of tasks. To locate the UUID of a SAN MDC in Xsan: sudo serveradmin settings san:UUID The output is just the GUID of the san client UUID. Now you know.
-
Bypass the Application Downloaded From the Internet Warning in OS X
___ “is an application downloaded from the Internet. Are you sure you want to open it?” is a warning dialog that appears when you open an application that you downloaded from the Internet. When you install those software titles with automation, you can clear the attribute that causes the prompt, so you don’t get a lot of confusion from end users. TO do so, use the xattr command, using -d to delete the com.apple.quarantine attribute. Here, we’re going to do so recursively, using the -r option and finally defining the application: sudo xattr -d -r com.apple.quarantine /Applications/iExplorer.app
-
More Command Line Service Control In OS X
The serverctl command can be used to start and stop services in OS X Server. Use serverctl with a list verb to show a list of services: serverctl list Grab a service (without the quotes) and feed it back into serverctl with the enable option and a service= option to identify the service: serverctl enable service=com.apple.servermgrd.xcode Or disable, using the disable verb: serverctl disable service=com.apple.servermgrd.xcode
-
Separate commands on one line in Bash
In bash, you can run multiple commands in a single line of a script. You do so by separating them with a semi-colon (;). The great thing about this is that if you end up using a variable, you can pass it on to subsequent commands. Here, we’re going to string three commands together and then echo the output: a=1;b=2;c=$a+$b;echo $c because we told c to be $a + $b, the $a expands to 1 and the $b expands to 2, we throw them together and then echo out the contents of c$ which appears as follows: 1+2 Now, we could have this thing do math as well, by wrapping…
-
A Comprehensive List of OS X 10.x Error Codes
I just put a new page up based on a parsing thing I was working on the other night. Basically, it lists the error codes in OS X 10.x by type. Enjoy: https://krypted.com//guides/comprehensive-list-of-mac-os-x-error-codes/
-
Use Verbose Logging With Profile Manager
Verbose logging can help you isolate a number of problems with Profile Manager. Turn on verbose logging by writing a debugOutput key with a value of 3 into /Library/Preferences/com.apple.ProfileManager.plist using the defaults command: defaults write /Library/Preferences/com.apple.ProfileManager debugOutput 3 Once set, restart the daemon using killall: killall -u _devicemgr To disable, just write the key with a blank value: defaults delete /Library/Preferences/com.apple.ProfileManager debugOutput Then restart the daemon again: killall -u _devicemgr
-
X World: See You At The Sydney Mac Conference
I’ll be doing a couple of presentations in Sydney on July 9th and 10th at X World. Judging from the sessions in past years, it looks to be a great time that’s sure to make you smarter! If you’re able, check it out at http://auc.edu.au/xworld/about/.
-
Automatically let users install printers
A scripty way to install a printer: sudo /usr/sbin/lpadmin -p MYPRINTERNAME -L "" -E -v lpd://MYPRINTERIPADDRESS -P MYPRINTERPPDFILE So if you create a file called installprinter.terminal and then paste this command in there, it’ll install the printer. You’d need to change the items in all caps for it to run. Another way would be to use Profile Manager. There, you’d setup a basic profile manager server and then use the Printer profile (see screenshot) to install the printer. Then users can just double-click on the profile, install it to their printers and use it. That’s the modern/best/easiest way IMHO.
-
Install Pow for Rails Testing On OS X
Pow is a Rack server for OS X. It’s quick and easy to use and lets you skip that whole update an Apache file, then edit /etc/hosts, ethane move a file, then run an app type of process. To get started with Pow, curl it down and pipe it to a shell, then provide the password when prompted to do so: odr:~ charlesedge$ curl get.pow.cx | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9039 100 9039 0 0 10995 0 --:--:-- --:--:-- --:--:-- 10996 *** Installing Pow 0.5.0... *** Installing local configuration files... /Users/charlesedge/Library/LaunchAgents/cx.pow.powd.plist *** Installing system…