Re: [问题] 如何让shellscript重开机后继续执行

楼主: roxx (两斤阿吉)   2015-01-26 21:53:03
※ 引述《yavis (yavis)》之铭言:
: 如标题所示,小弟写了一个shell script,
: 过程中需要reboot机器,
: 想请问有什么方法能让机器重启后,
: 继续执行shellscript尚未执行的部分,
: 还请版上前辈多多指教, 谢谢
今天无意间闲晃到一个介绍 CRIU (Checkpoint/Restore In Userspace)
好像可以达到原PO的需求
http://www.criu.org/Main_Page
http://en.wikipedia.org/wiki/CRIU
You can freeze a running application (or part of it) and checkpoint
it to a hard drive as a collection of files. You can then use the files
to restore and run the application from the point it was frozen at.
原PO可以玩看看
作者: akasan (KITO)   2015-01-26 22:49:00
CRIU 需要 kernel 开启特定功能才能使用, 并需要3.11以上
作者: chusiang (冻仁翔)   2015-02-14 21:21:00
如果可以分成两部分写的话,把重开要跑的部份写在 /etc/rc.local 里应该也可以?

Links booklink

Contact Us: admin [ a t ] ucptt.com