fstab: Make auto attribute for filesystem type.

This commit is contained in:
Michael Tremer
2014-07-22 00:34:42 +02:00
parent 05cebb0d3f
commit 2c4536c75b
2 changed files with 3 additions and 17 deletions

View File

@@ -1,9 +1,9 @@
#
# file system mount-point type options dump fsck
# order
DEVICE1 /boot ext2 defaults 1 2
DEVICE1 /boot auto defaults 1 2
DEVICE2 swap swap pri=1 0 0
DEVICE3 / FSTYPE defaults 1 1
DEVICE4 /var FSTYPE defaults 1 1
DEVICE3 / auto defaults 1 1
DEVICE4 /var auto defaults 1 1
none /var/log/rrd tmpfs defaults,size=64M 0 0
none /var/lock tmpfs defaults,size=8M 0 0

View File

@@ -528,20 +528,6 @@ int main(int argc, char *argv[]) {
snprintf(commandstring, STRING_SIZE, "/bin/sed -i -e \"s#DEVICE4#UUID=$(/sbin/blkid %s -sUUID | /usr/bin/cut -d'\"' -f2)#g\" /harddisk/etc/fstab", destination->part_data);
system(commandstring);
switch (destination->filesystem) {
case HW_FS_REISERFS:
replace("/harddisk/etc/fstab", "FSTYPE", "reiserfs");
break;
case HW_FS_EXT4:
case HW_FS_EXT4_WO_JOURNAL:
replace("/harddisk/etc/fstab", "FSTYPE", "ext4");
break;
default:
assert(0);
}
replace("/harddisk/boot/grub/grub.conf", "KVER", KERNEL_VERSION);
snprintf(commandstring, STRING_SIZE, "/bin/sed -i -e \"s#root=ROOT#root=UUID=$(/sbin/blkid %s -sUUID | /usr/bin/cut -d'\"' -f2)#g\" /harddisk/boot/grub/grub.conf", destination->part_root);