mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-05-05 11:48:35 +00:00
move automount to packages
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
depend()
|
||||
{
|
||||
after dev
|
||||
before docker
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
ebegin "Configuring host block device"
|
||||
|
||||
DEV="$(ls /dev/[sxv]da | head -1 | sed s@/dev/@@)"
|
||||
DRIVE="/dev/${DEV}"
|
||||
|
||||
if fdisk -l ${DRIVE} | grep -q "doesn't contain a valid partition table"
|
||||
then
|
||||
ERASE_DISKS="${DRIVE}" setup-disk -m data ${DRIVE}
|
||||
else
|
||||
SWAP=$(fdisk -l ${DRIVE} | grep 'Linux swap' | head -1 | awk '{print $1}')
|
||||
DATA=$(fdisk -l ${DRIVE} | grep 'Linux$' | head -1 | awk '{print $1}')
|
||||
mount ${DATA} /var && swapon ${SWAP} || ERASE_DISKS="${DRIVE}" setup-disk -m data ${DRIVE}
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user