base: use systemd-timestamp for RD_TIMESTAMP, if possible

master
Harald Hoyer 2010-11-18 12:28:21 +01:00
parent 2eea164db7
commit b2415f4414
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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