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…
-
-
Configure OS X To Restart Automatically
Servers should always restart automatically in the event that they loose power or freeze up. When you’re setting up a lot of servers, it’s helpful to be able to tell the system to restart automatically if a server freezes from the command line. The command to have a system restart automatically in such a way is systemsetup. The systemsetup command has a -setrestartfreeze option. To enable the feature: systemsetup -setrestartfreeze on To disable: systemsetup -setrestartfreeze off
-
Configuring Time In OS X Mountain Lion & OS X Mountain Lion Server
Time is a very important aspect of OS X Server, as it has been since the early days. Time is so important that if you see network time server, NTP or 5 minutes as the answer on an Apple exam, you should just pick that one, as it’s invariably correct. The traditional way to configure time zones and Network Time Servers is to use systemsetup command. Before you set a time zone, run the following to see a list of all available time zones, use the -listtimezones option in systemsetup: sudo systemsetup -listtimezones To set the time zone, pick one and use the -settimezone option in systemsetup: sudo systemsetup -settimezone…
-
Snow Leopard systemsetup Options
systemsetup is a great little command, for setting date and time, for wake on LAN, etc. But in Mac OS X 10.6, you can also set your kernel boot architecture? Weird, eh? Not as weird as the length of the option… systemsetup -getkernelbootarchitecturesetting Try saying it three times really fast. Now again with a French accent! Anyway, so then you want to set the kernel boot architecture to 32 bit, set it to i386 and if you want to set it to 64 bit, use x86_64 with the -setkernelbootarchitecture option (default is the default value). It edits the com.apple.Boot.plist located at /Library/Preferences/SystemConfiguration/com.apple.Boot.plist.
-
Automating NTP Setup on Mac OS X
The two primary aspects of time setup are typically setting the time zone and setting the Network Time Protocol (NTP) server. The systemsetup command can be used to set both of these date and time options for Mac OS X computers. To see a listing of the available time zones in Mac OS X use the systemsetup with the -listtimezones option as follows: systemsetup -listtimezones Once you have the time zones you can then use systemsetup with the -settimezone option to configure the time zone on your system. It is often easiest to simply paste the time zone into the command. So to set the time zone to Detroit for…
-
Disable Xserve Keyboard Locking
When you use the key to lock an Xserve the keyboard and drive modules are locked into place. But in a number of environments only the drive modules should be locked and the keyboard itself should still be active. In order to disable this feature you can use the systemsetup command, leveraging the getdisablekeyboardwhenenclosurelockisengaged option (which by the way is one of the longest I’ve seen). If you run the following command and the keyboard locks when you lock the server then you should get a simple output of Yes systemsetup getdisablekeyboardwhenenclosurelockisengaged But if you swap the g with an s you have the option to alter the setting with a…