Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

allow custom rc-imaging scripts and show all disks for 10.13 #192

Merged
merged 1 commit into from
Oct 20, 2017

Conversation

erikng
Copy link
Contributor

@erikng erikng commented Oct 18, 2017

What does this PR do?

This PR makes it where Disk Utility will show the disks vs the Volumes, allowing an Imagr user to easily format a disk from APFS to HFS and vice versa. The default UI of Disk Utility hides this feature.

This PR also allows an admin to setup a custom rc.imaging script to do any number of things.

Simply add STARTTERMINAL=Custom to your config.mk file and make a custom file, places in the rc-imaging folder.

Previous Behavior

Previously the makefile used printf to generate the rc.imaging file and did not setup Disk Utility properly for 10.13

New Behavior

The makefile now calls out to the rc-imaging folder for these scripts, allowing an admin to easily write a script to do any number of custom things.

The admin should add a file called custom in the rc-imaging folder. A gitignore has also been setup for this file.

Example script:

#!/bin/bash
OS=`/usr/bin/sw_vers -productVersion`
if [[ "$OS" == *10.13* ]]
  then
    defaults write /var/root/Library/Preferences/com.apple.DiskUtility.plist SidebarShowAllDevices -bool TRUE
fi
/bin/mkdir -p /Volumes/imagrtest
/sbin/mount -t smbfs //username:password@IPADDRESS/sharepath /Volumes/imagrtest
/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal

@grahamgilbert
Copy link
Collaborator

This basically always copies over rc-imaging/custom. Unless I'm mistaken I don't see a scenario where Imagr actually opens.

@grahamgilbert
Copy link
Collaborator

Scratch that, I was mistaken.

@grahamgilbert grahamgilbert merged commit 031f663 into imagr:master Oct 20, 2017
@erikng erikng deleted the custom-rcimaging branch October 20, 2017 16:15
clburlison added a commit to clburlison/imagr that referenced this pull request Oct 30, 2017
This fixes an issue that was introduced with imagr#192.

When we release a dmg we need to include the custom rc files.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants