Browse Source

- vuplus/mdev: better names for mounted partitions

master
vanhofen 5 years ago
parent
commit
816b018269
  1. 2
      skel-root/vuplus/etc/mdev.conf
  2. 36
      skel-root/vuplus/lib/mdev/fs/mdev-mmcblk

2
skel-root/vuplus/etc/mdev.conf

@ -77,7 +77,7 @@ fp0 root:root 0660 =dbox/fp0
sr[0-9] root:root 0664 */lib/mdev/fs/mdev-mount sr[0-9] root:root 0664 */lib/mdev/fs/mdev-mount
# Memory cards / eMMC-Partitions # Memory cards / eMMC-Partitions
mmcblk0p%(BOOT_PARTITION) root:root 0664 @mount -t vfat /dev/$MDEV /boot 2>&1 >/dev/null mmcblk0p%(BOOT_PARTITION) root:root 0664 @mount -t vfat /dev/$MDEV /boot 2>&1 >/dev/null
mmcblk[0-9]p[0-9][0-9] root:root 0664 */lib/mdev/fs/mdev-mmcblk mmcblk[0-9]p[0-9]* root:root 0664 */lib/mdev/fs/mdev-mmcblk
# WLAN devices # WLAN devices
ra[0-9]* root:root 0644 */lib/mdev/net/mdev-wlan ra[0-9]* root:root 0644 */lib/mdev/net/mdev-wlan

36
skel-root/vuplus/lib/mdev/fs/mdev-mmcblk

@ -2,6 +2,8 @@
. /etc/init.d/globals . /etc/init.d/globals
LOGINFO "[$ACTION] processing $MDEV"
MOUNTBASE=/mnt MOUNTBASE=/mnt
MOUNTPOINT="$MOUNTBASE/$MDEV" MOUNTPOINT="$MOUNTBASE/$MDEV"
ROOTDEV=$(readlink /dev/root) ROOTDEV=$(readlink /dev/root)
@ -73,6 +75,35 @@ if [ -e /proc/stb/info/vumodel ]; then
for r in $ROOTFSDEVS; do for r in $ROOTFSDEVS; do
if [ "$MDEV" == "mmcblk0p$r" ]; then if [ "$MDEV" == "mmcblk0p$r" ]; then
ROOTFSDEV=$MDEV ROOTFSDEV=$MDEV
case $vumodel in
solo4k|ultimo4k|uno4k|uno4kse)
case $r in
5) R_PARTNAME="rootfs1" ;;
7) R_PARTNAME="rootfs2" ;;
9) R_PARTNAME="rootfs3" ;;
11) R_PARTNAME="rootfs4" ;;
esac
;;
duo4k)
case $r in
10) R_PARTNAME="rootfs1" ;;
12) R_PARTNAME="rootfs2" ;;
14) R_PARTNAME="rootfs3" ;;
16) R_PARTNAME="rootfs4" ;;
esac
;;
zero4k)
case $r in
8) R_PARTNAME="rootfs1" ;;
10) R_PARTNAME="rootfs2" ;;
12) R_PARTNAME="rootfs3" ;;
14) R_PARTNAME="rootfs4" ;;
esac
;;
esac
if [ $R_PARTNAME != "" ]; then
USE_PARTNAMES=1
fi
fi fi
done done
fi fi
@ -84,7 +115,10 @@ elif [ "$PARTNAME" == "storage" ]; then
fi fi
# do not add or remove root device again... # do not add or remove root device again...
[ "$ROOTDEV" = "$MDEV" -a "$R_PARTNAME" != "userdata" ] && exit 0 if [ "$ROOTDEV" = "$MDEV" -a "$R_PARTNAME" != "userdata" ]; then
LOGINFO "/dev/$MDEV already mounted - not mounting again"
exit 0
fi
if [ -e /tmp/.nomdevmount ]; then if [ -e /tmp/.nomdevmount ]; then
LOGINFO "no action on $MDEV -- /tmp/.nomdevmount exists" LOGINFO "no action on $MDEV -- /tmp/.nomdevmount exists"

Loading…
Cancel
Save