uwu

hardware bitcoin wallet software and build system
git clone https://git.parazyd.org/uwu
Log | Files | Refs | README | LICENSE

commit 7bc92cedc88d14f6cebf25960e6af4dc6f99d004
parent 980898c2f36b4e5bbde7b41a0480e19676df0def
Author: parazyd <parazyd@dyne.org>
Date:   Tue,  2 Feb 2021 22:06:53 +0100

Add shell script to mount dev,proc,sys in chroot.

Diffstat:
Adevprocsys.sh | 22++++++++++++++++++++++
1 file changed, 22 insertions(+), 0 deletions(-)

diff --git a/devprocsys.sh b/devprocsys.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +[ -n "$2" ] || exit 1 + +case "$1" in +mount) + mkdir -p "$2/dev" "$2/proc" "$2/sys" + mount --types proc /proc "$2/proc" + mount --rbind /sys "$2/sys" + mount --make-rslave "$2/sys" + mount --rbind /dev "$2/dev" + mount --make-rslave "$2/dev" + exit 0 + ;; +umount) + umount -R "$2/dev" "$2/proc" "$2/sys" + exit 0 + ;; +esac + +exit 1