From 9583ba9b22c106e0ca41c46e63f6967458a5457a Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Mon, 5 Sep 2011 07:42:26 +0200 Subject: [PATCH] [scripts] create /proc and /dev/pts if they don't exist in source chroots --- scripts/inner_chroot_script.sh | 11 +++++++++++ scripts/inner_source_chroot_update.sh | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/scripts/inner_chroot_script.sh b/scripts/inner_chroot_script.sh index 468cad9..5234745 100755 --- a/scripts/inner_chroot_script.sh +++ b/scripts/inner_chroot_script.sh @@ -1,5 +1,16 @@ #!/bin/bash +# create /proc if it doesn't exist +# rsync doesn't copy it +if [ ! -d "/proc" ]; then + mkdir /proc + touch /proc/.keep +fi +if [ ! -d "/dev/pts" ]; then + mkdir /dev/pts + touch /dev/pts/.keep +fi + # copy /root defaults from /etc/skel rm -rf /root cp /etc/skel /root -Rap diff --git a/scripts/inner_source_chroot_update.sh b/scripts/inner_source_chroot_update.sh index 9c7b902..7bc1526 100755 --- a/scripts/inner_source_chroot_update.sh +++ b/scripts/inner_source_chroot_update.sh @@ -1,5 +1,16 @@ #!/bin/bash +# create /proc if it doesn't exist +# rsync doesn't copy it +if [ ! -d "/proc" ]; then + mkdir /proc + touch /proc/.keep +fi +if [ ! -d "/dev/pts" ]; then + mkdir /dev/pts + touch /dev/pts/.keep +fi + source /etc/profile env-update source /etc/profile