답변:
맨 페이지에서 pm-action(8)
:
/etc/pm/sleep.d, /usr/lib/pm-utils/sleep.d
Programs in these directories (called hooks) are combined
and executed in C sort order before suspend and hibernate
with as argument ´suspend´ or ´hibernate´. Afterwards they
are called in reverse order with argument ´resume´ and
´thaw´ respectively. If both directories contain a similar
named file, the one in /etc/pm/sleep.d will get preference.
It is possible to disable a hook in the distribution
directory by putting a non-executable file in
/etc/pm/sleep.d, or by adding it to the HOOK_BLACKLIST
configuration variable.
따라서 다음과 같이 간단히 쉘 스크립트를 넣을 수 있습니다.
#!/bin/bash
case "$1" in
suspend|hibernate)
actions to
take
on suspend
or hibernate
;;
resume|thaw)
other actions
to trigger
on resume
;;
esac
예를 들어 99-myhooks.sh
실행 가능하게 만드십시오.
BTW, Enter~.EnterSSH 세션 에 들어가서 오래된 SSH 연결을 끊을 수 있습니다 .