diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-04-07 08:31:51 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-04-07 08:31:51 +0000 |
commit | 0fdb828fc3b13dbb3454e3270dec8b7859f3cc6d (patch) | |
tree | 944fd923ea9d736785e99a2836e4d1bff8feee4e /setup-disk.in | |
parent | 34a1d6407670b4ec8079d4fad60e16af8c4a5b96 (diff) | |
download | alpine-conf-0fdb828fc3b13dbb3454e3270dec8b7859f3cc6d.tar.bz2 alpine-conf-0fdb828fc3b13dbb3454e3270dec8b7859f3cc6d.tar.xz |
setup-disk: generate new fstab
Diffstat (limited to 'setup-disk.in')
-rw-r--r-- | setup-disk.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/setup-disk.in b/setup-disk.in index 0602cab..7a485b8 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -180,7 +180,10 @@ label $KERNEL_FLAVOR kernel /boot/vmlinuz-$KERNEL_FLAVOR append initrd=/boot/initramfs-$KERNEL_FLAVOR root=$(uuid_or_device $rootdev) modules=sd-mod,usb-storage,ext3$raidmod ${pax_nouderef}quiet EOF - # fix the fstab + # generate the fstab + if [ -f "$mnt"/etc/fstab ]; then + mv "$mnt"/etc/fstab "$mnt"/etc/fstab.old + fi enumerate_fstab "$mnt" >> "$mnt"/etc/fstab # install extlinux @@ -362,10 +365,10 @@ EOF rc-update --quiet add mdadm-raid boot fi rc-update --quiet add swap boot + install_mounted_root /mnt || return 1 # the func to generate fstab does not detect swap. add it manually sed -i -e '/swap/d' /etc/fstab echo -e "$(uuid_or_device $swap_dev)\tswap\t\tswap\tdefaults 0 0" >> /etc/fstab - install_mounted_root /mnt } usage() { |