update rtc with system clock when shutdown
This commit is contained in:
parent
208fb56369
commit
2e25f75bbe
52
1605-update-rtc-with-system-clock-when-shutdown.patch
Normal file
52
1605-update-rtc-with-system-clock-when-shutdown.patch
Normal file
@ -0,0 +1,52 @@
|
||||
m 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 ++
|
||||
|
||||
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 0000000..db33418
|
||||
--- /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 e4ac6ce..67126d6 100644
|
||||
--- a/units/meson.build
|
||||
+++ b/units/meson.build
|
||||
@@ -211,6 +211,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',
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
11
systemd.spec
11
systemd.spec
@ -16,7 +16,7 @@
|
||||
Name: systemd
|
||||
Url: https://www.freedesktop.org/wiki/Software/systemd
|
||||
Version: 243
|
||||
Release: 14
|
||||
Release: 15
|
||||
License: MIT and LGPLv2+ and GPLv2+
|
||||
Summary: System and Service Manager
|
||||
|
||||
@ -52,6 +52,7 @@ Patch0005: 0001-core-shorten-code-a-bit.patch
|
||||
Patch0006: 0001-core-no-need-to-eat-up-error.patch
|
||||
Patch0007: 0001-core-create-or-remove-unit-bus-name-slots-always-together.patch
|
||||
Patch0008: 0001-core-drop-initial-ListNames-bus-call-from-PID1.patch
|
||||
Patch0009: 1605-update-rtc-with-system-clock-when-shutdown.patch
|
||||
|
||||
#openEuler
|
||||
Patch9002: 1509-fix-journal-file-descriptors-leak-problems.patch
|
||||
@ -844,6 +845,8 @@ fi
|
||||
%dir /usr/lib/sysusers.d
|
||||
/usr/lib/sysusers.d/systemd.conf
|
||||
/usr/lib/sysusers.d/basic.conf
|
||||
/usr/lib/systemd/system/hwclock-save.service
|
||||
/usr/lib/systemd/system/sysinit.target.wants/hwclock-save.service
|
||||
%{_systemddir}/systemd-update-done
|
||||
%{_systemddir}/systemd-update-utmp
|
||||
%{_systemddir}/systemd-initctl
|
||||
@ -1453,6 +1456,12 @@ fi
|
||||
%exclude /usr/share/man/man3/*
|
||||
|
||||
%changelog
|
||||
* Sat Feb 29 2020 openEuler Buildteam <buildteam@openeuler.org> - 243-15
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update rtc with system clock when shutdown
|
||||
|
||||
* Mon Feb 17 2020 openEuler Buildteam <buildteam@openeuler.org> - 243-14
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user