if [[ -z ${UNSHARE} ]] ; then
mount_args=
if type -P unshare >&/dev/null ; then
+ test_arg() { unshare "$@" -- true >&/dev/null && uargs+=( "$@" ) || :; }
uargs=( -m )
- unshare -u -- true >&/dev/null && uargs+=( -u )
- unshare -i -- true >&/dev/null && uargs+=( -i )
- unshare -p -- true >&/dev/null && uargs+=( -p -f --mount-proc )
+ test_arg -u
+ test_arg -i
+ test_arg -p -f --mount-proc
+ test_arg --propagation=private
UNSHARE=true exec unshare "${uargs[@]}" -- "$0" "$@"
fi
else
*64-bit*PowerPC*) echo ppc64;;
*32-bit*S/390*) echo s390;;
*64-bit*S/390*) echo s390x;;
+ *64-bit*MIPS*) echo mips64;;
+ *32-bit*MIPS*N32*)echo mips64;;
+ *32-bit*MIPS*) echo mips;;
+ *32-bit*PA-RISC*) echo parisc;;
+ *64-bit*PA-RISC*) echo parisc64;;
+ *32-bit*SPARC*) echo sparc;;
+ *64-bit*SPARC*) echo sparc64;;
esac
}
fi
done
- f="${HOME}/.profile.d/aliases.sh"
- if [[ -e ${f} ]] ; then
- cat "${f}" > root/.bash_profile
+ if [[ ! -d root/.git ]] ; then
+ f="${HOME}/.profile.d/aliases.sh"
+ if [[ -e ${f} ]] ; then
+ cat "${f}" > root/.bash_profile
+ fi
fi
}