diff options
author | dancer <dancer> | 2003-08-20 14:44:26 +0000 |
---|---|---|
committer | dancer <dancer> | 2003-08-20 14:44:26 +0000 |
commit | 2d91cebc1ef1cd68b99a48e98e5419a4f6db380e (patch) | |
tree | fb38b4455274757a46bd3900a28b7a3181761952 /pbuilder-user-mode-linux | |
parent | 4a013986624c22d0496f8c74eeb49bad8315d72f (diff) | |
download | pbuilder-2d91cebc1ef1cd68b99a48e98e5419a4f6db380e.tar pbuilder-2d91cebc1ef1cd68b99a48e98e5419a4f6db380e.tar.gz |
+ * pbuilder-user-mode-linux: Give warning when ran as root.
+ * Give more meaningful message when there is problem accessing the root
+ filesystem from inside user-mode-linux. (closes: #206292)
Diffstat (limited to 'pbuilder-user-mode-linux')
-rwxr-xr-x | pbuilder-user-mode-linux | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pbuilder-user-mode-linux b/pbuilder-user-mode-linux index 616ab85..5e80149 100755 --- a/pbuilder-user-mode-linux +++ b/pbuilder-user-mode-linux @@ -60,7 +60,10 @@ ${UML_DEBUGMODE} mount -t proc /proc /proc mount -t tmpfs /tmp /tmp -mount -t ext2 /dev/ubd/1 ${UML_CHROOT_MOUNTPOINT} +if ! mount -t ext2 /dev/ubd/1 ${UML_CHROOT_MOUNTPOINT}; then + echo "E: Cannot mount /dev/ubd/1, is UML root image accessible as current user?" + exit 1 +fi export LOGNAME="${LOGNAME}" export HOME="${HOME}" hostname "${UML_HOSTNAME}" @@ -121,6 +124,10 @@ EOF chmod a+x ${INSIDE_PBUILDER} + if [ $( id -u ) = 0 ]; then + echo "W: You are uid=0. Don't run UML as uid=0, it's not supported." + fi + echo Invoking: "linux mem=${UML_MEM} eth0=${MY_ETH0} con0=fd:0,fd:1 con=pty root=/dev/root rootflags=/ rootfstype=hostfs ubd1=${PBUILDER_COW}${PBUILDER_UML_IMAGE} devfs=mount init=${INSIDE_PBUILDER} rw" if linux mem=${UML_MEM} eth0=${MY_ETH0} con0=fd:0,fd:1 con=pty root=/dev/root rootflags=/ rootfstype=hostfs ubd1="${PBUILDER_COW}${PBUILDER_UML_IMAGE}" devfs=mount init=${INSIDE_PBUILDER} rw ; then UML_EXITCODE=$? |