chilcote / outset

Automatically process packages, profiles, and scripts during boot, login, or on demand.
572 stars 58 forks source link

Scripts run manually, but not on boot #58

Closed atrystan closed 6 years ago

atrystan commented 6 years ago

The Jamf forum and many Google searches pointed us towards you. We are trying to create a simple script that unmounts a particular partition, either on boot or at login, so that it remains relatively hidden from our users.

Our script will contain the following:

umount /Volumes/admin

Nothing really special here. If we invoke it manually by doing:

/usr/local/outset/outset --login

it works just fine. It does not seem to work on login, however. Could you suggest where we might begin to troubleshoot?

WardsParadox commented 6 years ago

Would you post the script?

ndavis98uw commented 6 years ago

Hi, I've also been working on this issue with atrystan. Here is the script that we've been using.

unmount_admin.txt (We've been using this as a .sh but github would not allow me to copy a .sh file into this comment.)

WardsParadox commented 6 years ago

Your script is using sudo. There are no prompts presented when launched via a LaunchAgent/Daemon so it fails. Try doing:

#!/bin/bash
umount /dev/disk0s4

and store it in login-every-privilaged instead. that should execute it at login with admin privileges.

If either of you are in the macadmins.org slack instance, join the outset channel there. Easier to chat and fix than filing an issue here :)

atrystan commented 6 years ago

Hadn't realized that there was a sudo in there. Putting it in the privileged folder seems to have taken care of it. Cheers!