#!/bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin SYSTEM_MNT=/opt SYS_BLK_DIR=/sys/class/block mount -o nosuid,strictatime,mode=755 -t devtmpfs devtmpfs /dev mount -o nosuid,noexec,nodev -t sysfs sysfs /sys mount -o nosuid,noexec,nodev -t proc proc /proc ROOTFS=`/sbin/blkid -L rootfs` if [ x$ROOTFS = "x" ] then ROOTFS=`/sbin/blkid -t PARTLABEL=rootfs -o device` fi DATAFS=`/sbin/blkid -L system-data` if [ x$DATAFS = "x" ] then DATAFS=`/sbin/blkid -t PARTLABEL=system-data -o device` fi if [ "$ROOTFS" == "" ] then echo "Warning : There is no rootfs partition." else /usr/bin/mount | grep "$ROOTFS " > /dev/null if [ $? = "0" ] then /usr/bin/mount -o remount,rw $ROOTFS fi /sbin/fsck $ROOTFS /sbin/resize2fs -f $ROOTFS fi if [ "$DATAFS" == "" ] then echo "Warning : There is no system-data partition." else /usr/bin/mount | grep "$DATAFS " > /dev/null if [ $? = "0" ] then /usr/bin/umount -l "DATAFS" fi /usr/bin/mount $DATAFS $SYSTEM_MNT fi INIT=/usr/lib/systemd/systemd if [ $$ = 1 ]; then [ "$INIT" ] && exec "$INIT" "$@" fi echo "======================================================================" echo "[/sbin/init] WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" echo "This Message should be never printed. ($INIT execution failure?)" echo "======================================================================" exec /bin/sh