Custom CLI Commands - DeployStudio
Appearance
If you find that you are missing some bash commands on the DeployStudio Netboot set that you need for various scripts, do not fret, there is a solution!
Firstly, back up your sys_builder.sh file. It is located here:
/Applications/Utilities/DeployStudio\ Admin.app/Contents/Resources/DeployStudio\ Assistant.app/Contents/Resources/sysBuilder/sys_builder.sh
Note: There are multiple sections for various versions of OS X. Make sure you add the commands into the correct section (fill_volume_1070 for Lion, fill_volume_1060 for Snow Leopard, etc)
- First, figure out which commands you need and made a list. Now figure out where they live and make note of that as well. For this example, we'll be adding ldapsearch and ldapdelete to our netboot set. They both live in /usr/bin
- Open sys_builder.sh in your favorite text editor (Vim and Textwrangler are both find choices).
- Find the USR_BIN="..." section of sys_builder.sh
- You will see there is a list of commands separated by spaces. Add whichever command you need into this group. The finished product after adding ldadsearch and ldapdelete will look something like this:
USR_BIN="afconvert afinfo afplay atos auval auvaltool basename cd chgrp curl diff dirname dscl du egrep \
false fgrep fs_usage gunzip gzip lsbom ldapsearch ldapdelete mkbom nmblookup ntlm_auth open printf rsync say srm \
smbcacls smbclient smbcontrol smbcquotas smbget smbpasswd smbspool smbstatus smbtree smbutil \
uuidgen xxd syslog"
Once you've added the bash commands you need to the proper place, just save the file, generate a new netboot set and you should be good.