Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From c3959bd00665e24a955bbdbea1ef555e76372f12 Mon Sep 17 00:00:00 2001 |
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
| 3 | Date: Mon, 8 May 2017 16:25:16 +0800 |
| 4 | Subject: [PATCH 04/13] Mount /var/volatile during install |
| 5 | |
| 6 | The installed system needs /var/volatile clean, otherwise it |
| 7 | caused systemd's journalctl failed to record boot log. |
| 8 | |
| 9 | Upstream-Status: Inappropriate [oe specific] |
| 10 | |
| 11 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 12 | --- |
| 13 | blivet/osinstall.py | 9 +++++++++ |
| 14 | 1 file changed, 9 insertions(+) |
| 15 | |
| 16 | diff --git a/blivet/osinstall.py b/blivet/osinstall.py |
| 17 | index a4f9535..61819c2 100644 |
| 18 | --- a/blivet/osinstall.py |
| 19 | +++ b/blivet/osinstall.py |
| 20 | @@ -294,6 +294,7 @@ class FSSet(object): |
| 21 | self._sysfs = None |
| 22 | self._proc = None |
| 23 | self._devshm = None |
| 24 | + self._volatile = None |
| 25 | self._usb = None |
| 26 | self._selinux = None |
| 27 | self._run = None |
| 28 | @@ -335,6 +336,12 @@ class FSSet(object): |
| 29 | return self._devshm |
| 30 | |
| 31 | @property |
| 32 | + def volatile(self): |
| 33 | + if not self._volatile: |
| 34 | + self._volatile = NoDevice(fmt=get_format("tmpfs", device="tmpfs", mountpoint="/var/volatile")) |
| 35 | + return self._volatile |
| 36 | + |
| 37 | + @property |
| 38 | def usb(self): |
| 39 | if not self._usb: |
| 40 | self._usb = NoDevice(fmt=get_format("usbfs", device="usbfs", mountpoint="/proc/bus/usb")) |
| 41 | @@ -591,6 +598,7 @@ class FSSet(object): |
| 42 | |
| 43 | devices = list(self.mountpoints.values()) + self.swap_devices |
| 44 | devices.extend([self.dev, self.devshm, self.devpts, self.sysfs, |
| 45 | + self.volatile, |
| 46 | self.proc, self.selinux, self.usb, self.run]) |
| 47 | if isinstance(_platform, EFI): |
| 48 | devices.append(self.efivars) |
| 49 | @@ -650,6 +658,7 @@ class FSSet(object): |
| 50 | """ unmount filesystems, except swap if swapoff == False """ |
| 51 | devices = list(self.mountpoints.values()) + self.swap_devices |
| 52 | devices.extend([self.dev, self.devshm, self.devpts, self.sysfs, |
| 53 | + self.volatile, |
| 54 | self.proc, self.usb, self.selinux, self.run]) |
| 55 | if isinstance(_platform, EFI): |
| 56 | devices.append(self.efivars) |
| 57 | -- |
| 58 | 2.7.4 |
| 59 | |