
如何在休眠前後觸發掛載/卸載?我用的是s2disk。
筆記:德班
答案1
您應該能夠編寫一個啟動/停止腳本來安裝或卸載您的檔案系統,並將其放入/etc/pm/sleep.d
(假設該目錄存在)。
雖然這一頁談到 Lenny,我認為這對 Wheezy 來說也同樣適用。
總而言之,您的腳本應該像初始化腳本一樣工作,但將休眠、掛起、恢復和解凍作為輸入進行處理。這是該頁面的範例,
case "$1" in
hibernate|suspend)
/etc/init.d/bluetooth stop
/etc/init.d/atheros stop
;;
thaw|resume)
/etc/init.d/bluetooth start
/etc/init.d/atheros start
;;
*) exit $NA
;;
esac