1 Star 0 Fork 97

yefei/systemd

forked from src-openEuler/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
1605-update-rtc-with-system-clock-when-shutdown.patch 1.66 KB
一键复制 编辑 原始数据 按行查看 历史
fangxiuning 提交于 2020-06-12 11:23 . modify
From a13f14c6a2da55b9f797b6f33449ba523c07dd46 Mon Sep 17 00:00:00 2001
From: update-rtc-with-system-clock-when-shutdown
Date: Sat, 2 Feb 2019 02:54:52 -0500
Subject: [PATCH] Module: modification summary
---
units/hwclock-save.service.in | 19 +++++++++++++++++++
units/meson.build | 2 ++
2 files changed, 21 insertions(+)
create mode 100644 units/hwclock-save.service.in
diff --git a/units/hwclock-save.service.in b/units/hwclock-save.service.in
new file mode 100644
index 0000000000..db33418932
--- /dev/null
+++ b/units/hwclock-save.service.in
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it+
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Update RTC With System Clock
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/true
+ExecStop=/sbin/hwclock --systohc
+RemainAfterExit=yes
+
+[Install]
+WantedBy=default.target
+
diff --git a/units/meson.build b/units/meson.build
index c641900c66..63fc331921 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -220,6 +220,8 @@ in_units = [
'sysinit.target.wants/'],
['systemd-update-done.service', '',
'sysinit.target.wants/'],
+ ['hwclock-save.service', '',
+ 'sysinit.target.wants/'],
['systemd-update-utmp-runlevel.service', 'ENABLE_UTMP HAVE_SYSV_COMPAT',
'multi-user.target.wants/ graphical.target.wants/ rescue.target.wants/'],
['systemd-update-utmp.service', 'ENABLE_UTMP',
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fayeinseu/systemd.git
git@gitee.com:fayeinseu/systemd.git
fayeinseu
systemd
systemd
master

搜索帮助