changes for alpine compatibility

Alpine Linux 'mount' will fail to mount an iso9660 filesystem without
an explicit type, so we modify glean.sh to pass `-t <type>` for both
vfat and iso9660 filesystem types.  We fall back to the default
behavior for unknown types.

Alpine Linux requires `#!/sbin/openrc-run` instead of
`#!/sbin/runscript` in init scripts.

Change-Id: I1a75cf6185d6bc42e77721368ca6930f7ef3f793
This commit is contained in:
Lars Kellogg-Stedman 2018-11-21 09:20:55 -05:00
parent 9f629b8531
commit a6a6dbd5fc
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
#!/sbin/runscript
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# $Id$

View File

@ -37,7 +37,9 @@ if [ -n "$CONFIG_DRIVE_LABEL" ]; then
BLOCKDEV="$(blkid -L ${CONFIG_DRIVE_LABEL})"
TYPE="$(blkid -t LABEL=${CONFIG_DRIVE_LABEL} -s TYPE -o value)"
if [[ "${TYPE}" == 'vfat' ]]; then
mount -o umask=0077 "${BLOCKDEV}" /mnt/config || true
mount -t vfat -o umask=0077 "${BLOCKDEV}" /mnt/config || true
elif [[ "${TYPE}" == 'iso9660' ]]; then
mount -t iso9660 -o ro,mode=0700 "${BLOCKDEV}" /mnt/config || true
else
mount -o mode=0700 "${BLOCKDEV}" /mnt/config || true
fi