Magellan Linux

Diff of /smage/branches/alx-0_6_0/core/util-linux/util-linux-2.23.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6913 by niro, Wed Jul 22 14:12:36 2015 UTC revision 6914 by niro, Mon Jul 27 13:00:29 2015 UTC
# Line 95  alx_generic_src_install() Line 95  alx_generic_src_install()
95   fsck.minix fsfreeze fstrim mkfs mkfs.bfs mkfs.cramfs raw sfdisk swaplabel wipefs || die   fsck.minix fsfreeze fstrim mkfs mkfs.bfs mkfs.cramfs raw sfdisk swaplabel wipefs || die
96   zapmost ${BINDIR}/usr/sbin addpart delpart fdformat ldattach partx rtcwake tunelp uuidd || die   zapmost ${BINDIR}/usr/sbin addpart delpart fdformat ldattach partx rtcwake tunelp uuidd || die
97  }  }
98    
99    postinstall()
100    {
101     # upgrade fstab to use UUIDs
102     if [[ -z $(grep UUID /etc/fstab) ]]
103     then
104     echo "Upgrading '/etc/fstab' to use UUIDs"
105    
106     # backup fstab and clear it
107     cp -f /etc/fstab{,.alx-backup}
108     :> /etc/fstab
109    
110     # update fstab to use UUIDS
111     while read device mountpoint filesystem options check
112     do
113     case "${mountpoint}" in
114     "/"|"/boot")
115     # reset
116     UUID=""
117     # get uuid
118     eval $(blkid "${device}" | grep "${device}:" | sed 's/.*:.*UUID=\(.*\).*TYPE.*/UUID="\1"/;s:\ ::g')
119     echo "   '${device}' ==> UUID='${UUID}'"
120     echo "UUID=${UUID} ${mountpoint} ${filesystem} ${options} ${check}" >> /etc/fstab
121     ;;
122     *)
123     echo "${device} ${mountpoint} ${filesystem} ${options} ${check}" >> /etc/fstab
124     ;;
125     esac
126     done < /etc/fstab.alx-backup
127     else
128     echo "No fstab upgrade required, '/etc/fstab' is already using UUIDs"
129     fi
130    }

Legend:
Removed from v.6913  
changed lines
  Added in v.6914