modify fstab, check partitions

modified:   dialog/di_dialog.py
	modified:   interface/ri_oper.py
	modified:   operation/configure_fstab.sh
This commit is contained in:
hbjia
2012-10-31 15:44:42 +08:00
parent f5c38cd5b7
commit 8ecec09ea7
3 changed files with 12 additions and 14 deletions

View File

@@ -93,15 +93,6 @@ configure_fstab ()
info "$devname $mountpoint $fs_type $fs_mntops $fs_freq $fs_passno"
printf "%-60s %-10s %-10s %-25s %-1s %-1s\n" $devname $mountpoint $fs_type $fs_mntops $fs_freq $fs_passno >>"$TARGET/etc/fstab"
# adjust the mount order in /etc/fstab
local num=$(grep -n 'UUID=.* / ' "$TARGET/etc/fstab" | cut -d':' -f1)
if [ "$num" != "" ];then
local mntrootfs=$(sed -n "${num}p" "$TARGET/etc/fstab")
sed -i "${num}d" "$TARGET/etc/fstab"
local num2=$(grep -n '^tmpfs' "$TARGET/etc/fstab" | cut -d':' -f1)
[ "$num2" != "" ] && sed -i "$((num2+1))i${mntrootfs}" "$TARGET/etc/fstab"
fi
}