Results 1 to 2 of 2

Thread: suspend/resume script failing

  1. #1
    Join Date
    Nov 2009

    suspend/resume script failing

    I have a startup script that changes my MAC address for me, but I noticed that after a successful suspend/resume it was changed back. So I did some research and put together a resume script that changes it back. I put in in /etc/pm/sleep.d/99_changemac-suspend. It actually points back to the original script in /etc/init.d that does the MAC change on boot and outputs $1 to a file so I can see that it ran and with what input.

    The script runs fine when I execute it manually and I can tell it runs on resume because the output file shows the expected input of "resume", but my MAC is not as it should be. I can only assume that even with a start order of 99 something else is running after it which reinitializes the NIC and loses my custom settings.

    What can I do to troubleshoot this issue? Is there a way to force my script to run last?
    I'm using 11.11

  2. #2
    Join Date
    Jun 2005
    Toronto, Canada
    Xubuntu 16.04 Xenial Xerus

    Re: suspend/resume script failing

    The scripts in /etc/pm/sleep.d run alphabetically ascending (0, 1, 2, a, b, c) during suspend and descending (c, b, a, 3, 2, 1) during resume. Try renaming your script to 02_changemac-suspend so it runs later in the process. See if that helps.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts