Skip to content

Commit

Permalink
Transforming fstab bottom script into normal live-boot script.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-baumann committed Jun 5, 2012
1 parent e41a83b commit dd7bdea
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 47 deletions.
47 changes: 0 additions & 47 deletions initramfs-tools/scripts/live-bottom/12fstab

This file was deleted.

1 change: 1 addition & 0 deletions scripts/boot.sh
Expand Up @@ -636,6 +636,7 @@ mountroot ()
fi

persistence_exclude
fstab

maybe_break live-bottom
log_begin_msg "Running /scripts/live-bottom\n"
Expand Down
38 changes: 38 additions & 0 deletions scripts/boot/fstab.sh
@@ -0,0 +1,38 @@
#!/bin/sh

#set -e

Fstab ()
{
# FIXME: stop hardcoding overloading of initramfs-tools functions
. /scripts/functions
. /lib/live/boot/initramfs-tools.sh

if [ -n "${NOFSTAB}" ]
then
return
fi

if [ -e /run ]
then
# wheezy
_FSTAB="/root/etc/fstab.d/live"
else
# squeeze
_FSTAB="/root/etc/fstab"
fi

log_begin_msg "Configuring fstab"

if ! grep -qs "^${UNIONTYPE}" "${_FSTAB}"
then
echo "${UNIONTYPE} / ${UNIONTYPE} rw 0 0" >> "${_FSTAB}"
fi

if ! grep -qs "^tmpfs /tmp" "${_FSTAB}"
then
echo "tmpfs /tmp tmpfs nosuid,nodev 0 0" >> "${_FSTAB}"
fi

log_end_msg
}

0 comments on commit dd7bdea

Please sign in to comment.