diff options
author | Dave Reisner <dreisner@archlinux.org> | 2011-08-02 20:55:41 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2011-10-01 05:22:48 +0200 |
commit | 39d7c2925a71d631cdb7711898eaeefa93af816a (patch) | |
tree | 7526bb740ed107ace30270ab2e2ebfefee31bb90 | |
parent | a0ea96ea0126814c518ffdc50449005b5b55d28e (diff) | |
download | mkinitcpio-39d7c2925a71d631cdb7711898eaeefa93af816a.tar.gz mkinitcpio-39d7c2925a71d631cdb7711898eaeefa93af816a.tar.xz |
mkinitcpio: insist that /dev and /proc be mounted
This avoids errors with process substitutions in chroots, among other
things. It's important that /proc be checked first as /etc/mtab might be
a link to /proc/self/mounts.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-x | mkinitcpio | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -156,6 +156,10 @@ if [[ -t 2 ]] && (( COLOR )); then fi readonly NC BOLD BLUE GREEN RED YELLOW +# insist that /proc and /dev be mounted (important for chroots) +mountpoint -q /proc || die "/proc must be mounted!" +mountpoint -q /dev || die "/dev must be mounted!" + if [[ $BASEDIR ]]; then # resolve the path. it might be a relative path and/or contain symlinks if ! pushd "$BASEDIR" &>/dev/null; then |