Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finishOSInstall script does not delete the Install .....app #48

Closed
ghost opened this issue Apr 27, 2018 · 4 comments
Closed

finishOSInstall script does not delete the Install .....app #48

ghost opened this issue Apr 27, 2018 · 4 comments
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Apr 27, 2018

Great process, thank you for sharing it.
When checking the final results we noticed the installer app is still there.
If we parse OSInstaller="$4" value like /Applications/Install macOS High Sierra.app we will need to escape the quotation marks in line 173 like:

/bin/echo "#!/bin/bash
## First Run Script to remove the installer.
## Clean up files
/bin/rm -fdr \"$OSInstaller\"
/bin/sleep 2
...

Thank you.

@kc9wwh kc9wwh self-assigned this Apr 27, 2018
@kc9wwh
Copy link
Owner

kc9wwh commented Apr 27, 2018

I will work on fixing this in the next version I am working on.

Thanks!

@ghost
Copy link
Author

ghost commented Apr 27, 2018

Thanks

@kc9wwh
Copy link
Owner

kc9wwh commented Apr 27, 2018

Updated code...

/bin/echo "#!/bin/bash
## First Run Script to remove the installer.
## Clean up files
/bin/rm -fdr \"$OSInstaller\"
/bin/sleep 2
## Update Device Inventory
/usr/local/jamf/bin/jamf recon
## Remove LaunchDaemon
/bin/rm -f /Library/LaunchDaemons/com.jamfps.cleanupOSInstall.plist
## Remove Script
/bin/rm -fdr /usr/local/jamfps
exit 0" > /usr/local/jamfps/finishOSInstall.sh

Updated output...

#!/bin/bash
## First Run Script to remove the installer.
## Clean up files
/bin/rm -fdr "/Applications/Install macOS High Sierra.app"
/bin/sleep 2
## Update Device Inventory
/usr/local/jamf/bin/jamf recon
## Remove LaunchDaemon
/bin/rm -f /Library/LaunchDaemons/com.jamfps.cleanupOSInstall.plist
## Remove Script
/bin/rm -fdr /usr/local/jamfps
exit 0

@kc9wwh kc9wwh added this to the v2.6.0 milestone Apr 27, 2018
kc9wwh pushed a commit that referenced this issue Apr 27, 2018
@kc9wwh kc9wwh added the bug label Apr 27, 2018
@kc9wwh
Copy link
Owner

kc9wwh commented Apr 27, 2018

Fixed in v2.6 branch, will merge to master when milestone is complete.

@kc9wwh kc9wwh closed this as completed Apr 27, 2018
@kc9wwh kc9wwh mentioned this issue Apr 30, 2018
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant