[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[RFC PATCH 3/3] Create stamp files to tell the real init system fsck was successful (Closes: #??????)



Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 initramfs-tools.8 | 6 ++++++
 scripts/functions | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/initramfs-tools.8 b/initramfs-tools.8
index 969aa1d..ea8c098 100644
--- a/initramfs-tools.8
+++ b/initramfs-tools.8
@@ -589,6 +589,12 @@ lsinitramfs /boot/initrd.img\-3.16\-3\-amd64
 .TP
 .I /run/initramfs/fsck.log
 Log of fsck commands run within the initramfs, with their output.
+.TP
+.I /run/initramfs/fsck-root
+Exists only if fsck ran successfully for the root filesystem.
+.TP
+.I /run/initramfs/fsck-usr
+Exists only if fsck ran successfully for the \fI/usr\fR filesystem.
 

 .SH AUTHOR
diff --git a/scripts/functions b/scripts/functions
index 03150c8..8c1bb1f 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -341,6 +341,7 @@ _checkfs_once()
 		NAME="root"
 	fi
 	FSCK_LOGFILE=/run/initramfs/fsck.log
+	FSCK_STAMPFILE=/run/initramfs/fsck-${NAME#/}
 
 	TYPE=$(get_fstype "$1")
 
@@ -396,6 +397,8 @@ _checkfs_once()
 	then
 		log_warning_msg "File system check failed but did not detect errors"
 		sleep 5
+	else
+		touch $FSCK_STAMPFILE
 	fi
 	return 0
 }

-- 
Ben Hutchings
I'm always amazed by the number of people who take up solipsism because
they heard someone else explain it. - E*Borg on alt.fan.pratchett

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: