Search
SailfishOS Open Build Service
>
Projects
>
nemo
:
devel:hw
:
x86:x86-common
>
installer-shell
> fix-mount-and-live-device-recognize.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File fix-mount-and-live-device-recognize.patch of Package installer-shell
diff -Naur a/installer-shell b/installer-shell --- a/installer-shell 2011-07-08 15:08:22.695176369 +0800 +++ b/installer-shell 2011-07-08 15:09:26.762495862 +0800 @@ -118,7 +118,7 @@ persistent_umount () { local MAX_TRY=10 local i=0 - while mount |grep "$1 " > /dev/null 2>&1; do + while cat /proc/mounts |grep "$1 " > /dev/null 2>&1; do if [ $i -ge $MAX_TRY ]; then break fi @@ -291,11 +291,11 @@ INDEX=0 if [ -L /dev/live ]; then LIVE_DEV=$(readlink /dev/live) - elif mount |grep " /mnt/live " >/dev/null 2>&1; then - LIVE_DEV=$(mount |grep " /mnt/live " |cut -d " " -f1) + elif cat /proc/mounts |grep " /mnt/live " >/dev/null 2>&1; then + LIVE_DEV=$(cat /proc/mounts |grep " /mnt/live " |cut -d " " -f1) LIVE_DEV=${LIVE_DEV#/dev/} else - LIVE_DEV=$(mount |grep "^/dev/.* / " |awk '{print $1}') + LIVE_DEV=$(cat /proc/mounts |grep "^/dev/.* / " |awk '{print $1}') LIVE_DEV=${LIVE_DEV#/dev/} fi LIVE_DEV=${LIVE_DEV%[0-9]*} @@ -608,7 +608,7 @@ create_partitions () { # Umount all partitions - for i in $(mount |grep "$DEV" |awk '{print $1}'); do + for i in $(cat /proc/mounts |grep "$DEV" |awk '{print $1}'); do dbglg "Umount $i, please wait..." persistent_umount $i done