Systemd uses /etc/initrd-release file to check if it is running on ramdisk.
Change-Id: I8a891c6a7f59c4c9237eebe4970cc943c89bbd7a
Refs: https://www.freedesktop.org/software/systemd/man/bootup.html
Refs: https://www.freedesktop.org/wiki/Software/systemd/InitrdInterface/
MODULES=
NEED_RESIZEFS=1
USERFS_ENCRYPTED=0
+IN_INITRD_RELEASE=0
function find_partitions()
{
function check_flags()
{
+ if [ -e /etc/initrd-release ]
+ then
+ IN_INITRD_RELEASE=1
+ fi
+
if [ x"$DATAFS" = "x" ]; then return; fi
/sbin/fsck -y $DATAFS
LN="/bin/ln"
SED="/bin/sed"
MKDIR="/bin/mkdir"
+TOUCH="/bin/touch"
DIRNAME="/usr/bin/dirname"
UNAME="/bin/uname"
ARCH=`$UNAME -m`
symlink_objects $SYM_LINKS
"$CP" -f "$INIT" "$INITRD_ROOT/sbin/init"
+ "$TOUCH" "$INITRD_ROOT/etc/initrd-release"
}
#-----------------------------------------------------------------------------