#!/bin/sh
# $Id: osx-boot-flags,v 1.3 2017/10/20 22:22:27 friedman Exp $

# An alternative approach is: /usr/sbin/nvram boot-args="-v"
#	 -v : verbose mode
#	 -x : safe mode

plb()
{
    /usr/libexec/PlistBuddy -c "$*" /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
}

case $# in
    0 ) plb 'print ":Kernel Flags"' ;;
    * ) plb   'set ":Kernel Flags" '"$*" ;;
esac

# eof
