From 6d0d3616a7366acab93b267d2fa778b3b18d9b56 Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Mon, 14 Dec 2015 18:16:08 +0000 Subject: [PATCH] fix automount script, as the settings do not persist, as fstab changes dropped Signed-off-by: Justin Cormack --- alpine/etc/init.d/automount | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/alpine/etc/init.d/automount b/alpine/etc/init.d/automount index 83904c97f..bee305551 100755 --- a/alpine/etc/init.d/automount +++ b/alpine/etc/init.d/automount @@ -13,9 +13,13 @@ start() # XXX this may change on other ports DEV="sda" DRIVE="/dev/${DEV}" + SWAP="${DRIVE}1" + DATA="${DRIVE}2" if fdisk -l ${DRIVE} | grep -q "doesn't contain a valid partition table" then ERASE_DISKS="${DRIVE}" setup-disk -m data ${DRIVE} + else + mount ${DATA} /var && swapon ${SWAP} || ERASE_DISKS="${DRIVE}" setup-disk -m data ${DRIVE} fi }