码迷,mamicode.com
首页 > 其他好文 > 详细

systemd --switched-root --deserialize 参数说明

时间:2017-08-23 13:43:24      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:systemd   deserialize   

systemd --switched-root --deserialize的这两个参数是内部用的,用于源代码中,不对外提供接口。


详见:

https://lists.freedesktop.org/archives/systemd-devel/2013-September/013008.html


关于这两个参数的解释可见:

https://unix.stackexchange.com/questions/98128/what-are-the-systemd-command-line-options-switched-root-and-deserialize


These are intentionally undocumented internal parts of systemd. Very simply, therefore:

  • --deserialize is used to restore saved internal state that a previous invocation of systemdexec()ing this one, has written out to a file. Its option argument is an open file descriptor for that process.

  • --switched-root is used to tell this invocation of systemd that it has been invoked from systemd managing an initramfs, and so should behave accordingly — including turning off some of the behaviour otherwise caused by --deserialize.

It‘s a good answer. To expand on this a bit: systemd running with --deserialize --switched-root essentially means systemd was also used in the initramfs. Nowadays this is pretty common, so those two options are to be expected in the command line of PID 1. 

本文出自 “敏而好学” 博客,谢绝转载!

systemd --switched-root --deserialize 参数说明

标签:systemd   deserialize   

原文地址:http://dangzhiqiang.blog.51cto.com/7961271/1958615

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!