Skip to content
Snippets Groups Projects
Commit 8ab40a4e authored by Eduardo L. Buratti's avatar Eduardo L. Buratti
Browse files

build: Update build_home path

parent acfc2bca
Branches
No related tags found
No related merge requests found
......@@ -58,13 +58,13 @@ function mount_image() {
mkdir -p "${img_mount}"
mount -o loop "${img_file}" "${img_mount}"
if [ ! -d "${build_home}" ]; then
mkdir -p "${build_home}"
chown "${orig_uid}:${orig_gid}" "${build_home}"
fi
#if [ ! -d "${build_home}" ]; then
# mkdir -p "${build_home}"
# chown "${orig_uid}:${orig_gid}" "${build_home}"
#fi
[ -d "${img_mount}/home/user/build" ] && mount -o bind "${build_home}" \
"${img_mount}/home/user/build"
[ -d "${img_mount}/home/user/proinfo" ] && mount -o bind "${build_home}" \
"${img_mount}/home/user/proinfo"
mkdir -p "${img_mount}/dev" && mount -o bind /dev "${img_mount}/dev"
mkdir -p "${img_mount}/proc" && mount -t proc -o nosuid,nodev,noexec proc "${img_mount}/proc"
......@@ -83,7 +83,7 @@ function mount_image() {
function umount_image() {
if is_mounted; then
set +e
[ -d "${img_mount}/home/user/build" ] && umount "${img_mount}/home/user/build"
[ -d "${img_mount}/home/user/proinfo" ] && umount "${img_mount}/home/user/proinfo"
[ -d "${img_mount}/tmp" ] && umount "${img_mount}/tmp"
[ -d "${img_mount}/run" ] && umount "${img_mount}/run"
[ -d "${img_mount}/sys" ] && umount "${img_mount}/sys"
......@@ -160,7 +160,7 @@ function bootstrap_create() {
chroot "${img_mount}" /usr/sbin/useradd --home-dir /home/user --no-create-home \
--gid usergroup --uid "${orig_uid}" --shell /bin/bash user
mkdir -p "${img_mount}/home/user/build"
mkdir -p "${img_mount}/home/user/proinfo"
chroot "${img_mount}" /bin/chown --recursive "${orig_uid}:usergroup" /home/user
fi
......@@ -208,7 +208,7 @@ function bootstrap_shell() {
##########
# default values fot parameters
build_home=build
build_home=..
img_size=1024
mirror_url="http://debian.c3sl.ufpr.br/debian"
no_confirm=0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment