setup-gummiboot-conf: Set background to black
[platform/adaptation/setup-scripts.git] / setup-ivi-fstab
index dca3ff8..c130e5f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh -euf
 
-# Copyright 2013 Intel Corporation
+# Copyright 2013-2014 Intel Corporation
 # Author: Artem Bityutskiy
 # License: GPLv2
 
@@ -21,7 +21,7 @@ fi
 # This is a small trick which I use to make sure my scripts are portable -
 # check if 'dash' is present, and if yes - use it.
 if can_switch_to_dash; then
-       exec dash -euf "$srcdir/$PROG" "$@"
+       exec dash -euf -- "$srcdir/$PROG" "$@"
        exit $?
 fi
 
@@ -98,11 +98,23 @@ sysfs   /sys      sysfs   defaults        0 0"
 
 pnum=0
 while [ "$pnum" -lt "$INSTALLERFW_PART_COUNT" ]; do
+       installerfw_verify_defined "INSTALLERFW_PART${pnum}_UUID"
+       installerfw_verify_defined "INSTALLERFW_PART${pnum}_MOUNTPOINT"
+       installerfw_verify_defined "INSTALLERFW_PART${pnum}_FSTYPE"
+
        eval uuid="\${INSTALLERFW_PART${pnum}_UUID:-}"
        eval mountpoint="\${INSTALLERFW_PART${pnum}_MOUNTPOINT:-}"
        eval fsopts="\${INSTALLERFW_PART${pnum}_FSOPTS:-defaults}"
        eval fstype="\${INSTALLERFW_PART${pnum}_FSTYPE:-}"
 
+       if [ "$fstype" = "vfat" ]; then
+               # FAT FS's short UUID has to be uppercase
+               uuid="$(printf "%s" "$uuid" | tr "[:lower:]" "[:upper:]")"
+       else
+               # Normal UUID has to be lowercase
+               uuid="$(printf "%s" "$uuid" | tr "[:upper:]" "[:lower:]")"
+       fi
+
        contents="${contents}${br}UUID=$uuid  $mountpoint  $fstype  $fsopts  0 0"
 
        pnum="$((pnum+1))"