|
|
@ -3,7 +3,7 @@ |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# Filename: target/idunn/initramfs/etc_rc.d_rc.trymount.sh |
|
|
|
# Copyright (C) 2008 The OpenSDE Project |
|
|
|
# Copyright (C) 2008 - 2009 The OpenSDE Project |
|
|
|
# |
|
|
|
# More information can be found in the files COPYING and README. |
|
|
|
# |
|
|
@ -27,19 +27,42 @@ if grep -q "^[^ ]* $rootfs " /proc/mounts; then |
|
|
|
elif [ -n "$root" ]; then |
|
|
|
. /etc/rc.d/functions.in |
|
|
|
|
|
|
|
title "Mouting $root at $rootfs." |
|
|
|
check /lib/udev/vol_id "$root" > /tmp/vol_id.$$ |
|
|
|
. /tmp/vol_id.$$ |
|
|
|
rm -f /tmp/vol_id.$$ |
|
|
|
root_type= |
|
|
|
root_tag= |
|
|
|
root_options="$root_mode" |
|
|
|
|
|
|
|
if [ -n "$ID_FS_TYPE" ]; then |
|
|
|
modprobe -q "$ID_FS_TYPE" |
|
|
|
check mount -t "$ID_FS_TYPE" -o "$root_mode" "$root" "$rootfs" |
|
|
|
case "$root_method" in |
|
|
|
nfs) |
|
|
|
root_type="$root_method" |
|
|
|
root_options="$root_options,nolock,intr,tcp" |
|
|
|
;; |
|
|
|
find) # UUID= or LABEL= |
|
|
|
root_tag="$root" |
|
|
|
root=$(blkid -l -o device -t "$root_tag") |
|
|
|
[ -z "$root" ] || root_type=$(blkid -l -o value -t TYPE "$root") |
|
|
|
[ -z "$root_type" ] || root_tag="$root_tag, $root_type" |
|
|
|
;; |
|
|
|
device) |
|
|
|
root_type=$(blkid -l -o value -t TYPE "$root") |
|
|
|
;; |
|
|
|
esac |
|
|
|
|
|
|
|
if [ -z "$root" ]; then |
|
|
|
title "Mounting $root_tag at $rootfs." |
|
|
|
elif [ -z "$root_tag" ]; then |
|
|
|
title "Mounting $root ($root_type) at $rootfs." |
|
|
|
else |
|
|
|
title "Mounting $root ($root_tag) at $rootfs." |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -n "$root_type" ]; then |
|
|
|
modprobe -q "$root_type" |
|
|
|
check mount -t "$root_type" -o "$root_options" "$root" "$rootfs" |
|
|
|
else |
|
|
|
check false |
|
|
|
fi |
|
|
|
|
|
|
|
status |
|
|
|
status |
|
|
|
else |
|
|
|
[ -z "$verbose" ] || |
|
|
|
cat <<-EOT >&2 |
|
|
|