base: use systemd-timestamp for RD_TIMESTAMP, if possible
parent
2eea164db7
commit
b2415f4414
|
|
@ -76,8 +76,13 @@ RDDEBUG=""
|
|||
mount -t proc -o nosuid,noexec,nodev /proc /proc >/dev/null 2>&1
|
||||
mount -t sysfs -o nosuid,noexec,nodev /sys /sys >/dev/null 2>&1
|
||||
|
||||
read RD_TIMESTAMP _tmp < /proc/uptime
|
||||
unset _tmp
|
||||
|
||||
if [ -x /lib/systemd/systemd-timestamp ]; then
|
||||
RD_TIMESTAMP=$(/lib/systemd/systemd-timestamp)
|
||||
else
|
||||
read RD_TIMESTAMP _tmp < /proc/uptime
|
||||
unset _tmp
|
||||
fi
|
||||
|
||||
if [ ! -c /dev/ptmx ]; then
|
||||
# try to mount devtmpfs
|
||||
|
|
|
|||
|
|
@ -27,3 +27,4 @@ inst "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh"
|
|||
inst_hook cmdline 10 "$moddir/parse-root-opts.sh"
|
||||
inst_hook cmdline 20 "$moddir/parse-blacklist.sh"
|
||||
mkdir -p "${initdir}/var/run"
|
||||
[ -x /lib/systemd/systemd-timestamp ] && inst /lib/systemd/systemd-timestamp
|
||||
|
|
|
|||
Loading…
Reference in New Issue