def set_startup_disk(path):
    '''
    Set the current startup disk to the indicated path. Use
    ``system.list_startup_disks`` to find valid startup disks on the system.

    :param str path: The valid startup disk path

    :return: True if successful, False if not
    :rtype: bool

    CLI Example:

    .. code-block:: bash

        salt '*' system.set_startup_disk /System/Library/CoreServices
    '''
    if path not in list_startup_disks():
        msg = 'Invalid value passed for path.\n' \
              'Must be a valid startup disk as found in ' \
              'system.list_startup_disks.\n' \
              'Passed: {0}'.format(path)
        raise SaltInvocationError(msg)

    cmd = 'systemsetup -setstartupdisk {0}'.format(path)
    __utils__['mac_utils.execute_return_result'](cmd)

    return __utils__['mac_utils.confirm_updated'](
        path,
        get_startup_disk,
    )
def set_startup_disk ( path ) : if path not in list_startup_disks ( ) : msg = 'Invalid value passed for path.\n' 'Must be a valid startup disk as found in ' 'system.list_startup_disks.\n' 'Passed: {0}' . format ( path ) raise SaltInvocationError ( msg ) cmd = 'systemsetup -setstartupdisk {0}' . format ( path ) __utils__ [ 'mac_utils.execute_return_result' ] ( cmd ) return __utils__ [ 'mac_utils.confirm_updated' ] ( path , get_startup_disk , )
Set the current startup disk to the indicated path. Use
    ``system.list_startup_disks`` to find valid startup disks on the system.

    :param str path: The valid startup disk path

    :return: True if successful, False if not
    :rtype: bool

    CLI Example:

    .. code-block:: bash

        salt '*' system.set_startup_disk /System/Library/CoreServices