| Server IP : 45.40.142.9 / Your IP : 216.73.216.250 Web Server : Apache System : Linux s45-40-142-9.secureserver.net 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : bayspec ( 506) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/dracut/modules.d/95rootfs-block/ |
Upload File : |
#!/bin/sh
. /lib/dracut-lib.sh
filter_rootopts() {
local v
v=""
rootopts=$1
# strip ro and rw options
local OLDIFS="$IFS"
IFS=,
set -- $rootopts
IFS="$OLDIFS"
while [ $# -gt 0 ]; do
case $1 in
rw|ro);;
defaults);;
*)
v="$v,${1}";;
esac
shift
done
rootopts=${v#,}
echo $rootopts
}
if [ -n "$root" -a -z "${root%%block:*}" ]; then
mount -t ${fstype:-auto} -o "$rflags" "${root#block:}" "$NEWROOT" \
&& ROOTFS_MOUNTED=yes
if ! getarg rd_NO_FSTAB \
&& ! getarg rootflags \
&& [ -f "$NEWROOT/etc/fstab" ] \
&& ! [ -L "$NEWROOT/etc/fstab" ]; then
# if $NEWROOT/etc/fstab contains special mount options for
# the root filesystem,
# remount it with the proper options
rootfs="auto"
rootopts="defaults"
while read dev mp fs opts rest; do
# skip comments
[ "${dev%%#*}" != "$dev" ] && continue
if [ "$mp" = "/" ]; then
rootfs=$fs
rootopts=$opts
break
fi
done < "$NEWROOT/etc/fstab"
rootopts=$(filter_rootopts $rootopts)
if [ -n "$rootopts" ]; then
umount $NEWROOT
info "Remounting ${root#block:} with -o $rootopts,$rflags"
mount -t "$rootfs" -o "$rflags","$rootopts" \
"${root#block:}" "$NEWROOT" 2>&1 | vinfo
fi
fi
fi