[NTLUG:Discuss] bash Script help

Bobby Wrenn bobby at wrennest.com
Thu Aug 29 07:54:55 CDT 2013


On 08/28/2013 04:37 PM, Patrick R. Michaud wrote:
> On Wed, Aug 28, 2013 at 04:26:32PM -0500, Bobby Wrenn wrote:
> snip
> Because of the &, you may need to wait a couple of seconds
> before letting the script exit, otherwise the parent process
> may signal the child process to exit as well.
>
> But even better might be to not use an & at all, and simply do
>
>      exec ./FactoryRestore.sh
>
> This replaces the current shell with ./FactoryRestore.sh
> without creating a new process.
>
> Pm
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
Well it turned out to be a combination of two problems.

1. I should not use the & at the end
2. the factory restore script needed to sudo. So I added the user to 
sudoers with no password and prepended the call with sudo.

Now all I need to do is figure out how to do an "exit this dialog" 
button. Any ideas?

Bobby



More information about the Discuss mailing list