mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-27 12:38:11 +00:00
fix automount script, as the settings do not persist, as fstab changes dropped
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
parent
96df479682
commit
c6f6a6ffa2
@ -13,9 +13,13 @@ start()
|
|||||||
# XXX this may change on other ports
|
# XXX this may change on other ports
|
||||||
DEV="sda"
|
DEV="sda"
|
||||||
DRIVE="/dev/${DEV}"
|
DRIVE="/dev/${DEV}"
|
||||||
|
SWAP="${DRIVE}1"
|
||||||
|
DATA="${DRIVE}2"
|
||||||
|
|
||||||
if fdisk -l ${DRIVE} | grep -q "doesn't contain a valid partition table"
|
if fdisk -l ${DRIVE} | grep -q "doesn't contain a valid partition table"
|
||||||
then
|
then
|
||||||
ERASE_DISKS="${DRIVE}" setup-disk -m data ${DRIVE}
|
ERASE_DISKS="${DRIVE}" setup-disk -m data ${DRIVE}
|
||||||
|
else
|
||||||
|
mount ${DATA} /var && swapon ${SWAP} || ERASE_DISKS="${DRIVE}" setup-disk -m data ${DRIVE}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user