mirror of
git://soft.sys114.com/odroid-stamper
synced 2025-12-19 01:48:42 +09:00
functions/fixups: edit /etc/fstab when it exists
Signed-off-by: Dongjin Kim <tobetter@gmail.com> Change-Id: I5b8054b8951f16ba48da4cacdab5f7af23f91f1c
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
sed -i "/ \/boot /d" /etc/fstab
|
||||
sed -i "/ \/ /d" /etc/fstab
|
||||
if [ -f /etc/fstab ]; then
|
||||
# Remove BOOT/ROOTFS mount points
|
||||
sed -i "/ \/boot /d" /etc/fstab
|
||||
sed -i "/ \/ /d" /etc/fstab
|
||||
# Remove EFI partition not to mount
|
||||
sed -i "/\/boot\/efi/d" /etc/fstab
|
||||
fi
|
||||
|
||||
if [ "x@@DEFAULT_DEV_ROOTFS@@" != "x" ]; then
|
||||
cat <<__EOF | tee -a /etc/fstab >/dev/null
|
||||
@@ -15,7 +20,4 @@ UUID="@@DEFAULT_DEV_BOOT@@" /boot ext2 rw,relatime,errors=continue 0 0
|
||||
__EOF
|
||||
fi
|
||||
|
||||
# Remove EFI partition not to mount
|
||||
sed -i "/\/boot\/efi/d" /etc/fstab
|
||||
|
||||
update-initramfs -u
|
||||
|
||||
@@ -242,7 +242,10 @@ do_mount() {
|
||||
}
|
||||
|
||||
get_uuid_by_path() {
|
||||
grep " ${1} " ${rootfs_mnt}/etc/fstab | cut -d' ' -f1 | cut -d'=' -f2 | tr -d '"'
|
||||
if [ -f ${rootfs_mnt}/etc/fstab ]; then
|
||||
grep " ${1} " ${rootfs_mnt}/etc/fstab \
|
||||
| cut -d' ' -f1 | cut -d'=' -f2 | tr -d '"'
|
||||
fi
|
||||
}
|
||||
|
||||
do_create_squashfs() {
|
||||
|
||||
Reference in New Issue
Block a user