File System Management
By: James Reynolds - Revised: 2007-01-31 jamesFile System Management
Radmind Assistant comes with some automation functionality but Entman has additional automation to make running Radmind very easy at these times:
- Scheduled (using launchd)
- Login
- Logout
- On demand
Entman also logs entire output of the fsdiff and lapply commands and keeps the 5 previous copies to help debug errors.
Entman uses iHook to provide a GUI when running radmind.
After Radmind runs, the machine will reboot and the post maintenance scripts run. The post maintenance scripts do many things that are a pain to do with Radmind overloads. The best example is renaming everything in the user ByHost Preference folders.
When the post maintenance scripts are finished, they will again reboot the computer, and it will be usable after that.
Scheduling Radmind
Using launchd, Entman will automatically run maintenance according to a schedule.
To configure this, you need to edit the file /etc/entman/conf/nightly/radmind_reboot.
You can also *override* this file with a radmind command file located (on the server) at /var/radmind/command/conf/radmind_reboot.conf. If this file is downloaded to the client when running radmind (if it is in the client's command file) then this one will be moved to /etc/entman/conf/nightly/radmind_reboot on the client.
The syntax differences between /etc/entman/conf/nightly/radmind_reboot and /var/radmind/command/conf/radmind_reboot.conf is that the radmind version has an extra comment at the beginning of every line. Other than that they are identical. Here are some examples of the syntax.
10.0.1.1, 0 0 MH TWFSU
# * wildcard is supported. So this line will apply to every computer:
*, 0 0 MH TWFSU
# * applies at any level. These are all valid:
10.*, 0 0 MH TWFSU
10.0.*, 0 0 MH TWFSU
10.0.1.*, 0 0 MH TWFSU
# Ranges are also supported. So these are all valid:
10-20, 0 0 MH TWFSU
10.0-127, 0 0 MH TWFSU
10.0.128-255, 0 0 MH TWFSU
10.0.1.254-255, 0 0 MH TWFSU
Run at Radmind at Login
In order to run Radmind at login, you need to create a user named "radmind" in System Preferences, Accounts pane. You do not need to deploy a home folder for this user. In fact, you could map it to /dev/null or something if you wanted.
To run Radmind at login, simple login as the user "radmind".
Run Radmind at Logout
Launch Maintenance On Demand
The Entman idlescript checks every few seconds to see if the file /tmp/run_maintenance_now exists. If the file exists and no user is logged in, the computer will reboot and run radmind at startup. If a user is logged in a message will be displayed announcing that the computer will reboot in 5 minutes.
This is good for times when maintenance needs to be run outside of the scheduled times.

Displays maintenance status
Entman alerts of Radmind (and other) errors several ways:
- Menu bar status icon and text (when logged in)
- Login panel status icon and text (when logged out)
The icon is green if there are no errors. The icon is red if something is amiss.
The text states a few things. If the first character is an exclamation point, then the error is a radmind tool error. There are a few other error characters but frankly, I've never even seen them. If there is no error, there will be no character.
The next 2 characters (or first 2 if there was no error) will indicate when Radmind is scheduled to run. This assumes you have it configured to run weekly. There are many choices actually. But the breakdown is something like this. A "M" means Monday, "T" Tuesday, "W" Wednesday, "H" Thursday, "F" Friday, "S" Saturday, "U" Sunday, "M7" every day, "M5" weekdays. If you run Radmind twice a week, the 2 days it runs will be in the text.
The last 4 or 5 characters indicates the date Radmind last ran.
If you are logged in, you can click on the Menu item and get more information.
There is also database support that uploads this info, but currently it only works with a custom FileMaker Pro database that needs to be ported to Ruby on Rails before being made public.



Post Maintenance
Mac OS X stores preferences in several places. System prefs are stored in /Library/Preferences and user prefs in ~/Library/Preferences. Mac OS X is designed to be very flexible. It has a mechanism for saving prefs specific to a particular machine, so in a network home folder environment, prefs for a particular user will not be the same for 2 different machine. These are called byhost prefs and are stored in ~/Library/Preferences/ByHost.

The names of files in the ByHost folder contain the MAC address of the machine, like this: com.apple.iTunes.000b25a4c27d.plist. If you use any kind of file management software when these files get copied to the new machine it will ignore them because the MAC address encoded in the file name doesn't match the actual MAC address. This means that the settings they contain will be set to the defaults.
ULabMin will correctly name preference files in the ByHost folder if you replace the MAC address with 12 x's. For example, on a computer with the MAC address 000e253fc13d, the file:
~/Library/Preferences/ByHost/com.apple.iTunes.xxxxxxxxxxxx.plist
will be changed to:
~/Library/Preferences/ByHost/com.apple.iTunes.000e253fc13d.plist
To take advantage of this, you must rename the files before they are uploaded to the radmind server. The actual files that will be fixed are the files in the template home folder and the admin home folder. Other home folders are ignored.
Sets computer name
ULabMin will set the computer name using the prefix of the machine's DNS name.
Sets hard disk name
ULabMin will also set the name of the boot volume to whatever you specify.