Buildroot wake up script

I need to run a custom script after wake-up on buildroot. I’m able to run it after the startup but I can’t figure out how to run a script after resume/wakeup.

Can you help me.

Regards,

Matteo

Dear @matteo_s ,

Are you using Systemd? In that case, maybe this link is helpful: laptop - Writing a systemd service to be executed at resume - Unix & Linux Stack Exchange

Best Regards,
Janani

Unfortunately I’m not using systemd. I just have init.d.

Dear @matteo_s ,

In that case, probably this technique mentioned in this link might do the trick: [all variants] HowTo run a script after RESUME [LUCID]

Best Regards,
Janani

Unfortunately the directory mentioned in this thread is part of systemd initialisation… I need a solution when Busybox is the initialisation system.

Thank you,

Matteo

Dear @matteo_s

Do you use busybox sysvinit then? Unfortunately, we don’t know how the power management works there. Maybe you have some luck in the sources? SysVInit would allow to use /etc/pm as @saijanani.tx wrote… If busybox sysvinit doesn’t support that it’s unfortunately hard to support you. How do you put your system into suspend? Can’t you do just something like:

#!/bin/bash

do_before_suspend
# Probably echo 1 > /sys/..../suspend
do_after_suspend

Regards,
Stefan