Commit Graph

15 Commits

Author SHA1 Message Date
Dave Reisner
1d35997222 common: auto-register api_fs_umount EXIT trap
This corrects some weird/wrong EXIT trap decls in arch-chroot and
pacstrap that should have been touched as part of the cleanup in
517fcff074.
2013-05-23 12:06:29 -04:00
Dave Reisner
517fcff074 chroot: do better bookkeeping of mounted devices
This was brought up when a user tried to arch-chroot into the same
root twice from different terminals. The second chroot should fail, but
not tear down the tree that it doesn't own.
2012-12-16 12:07:20 -05:00
Dave Reisner
cf84170321 add the -h option to the usage 2012-11-12 21:00:09 -05:00
Dave Reisner
debff1be89 arch-chroot: explain default behavior in usage 2012-09-08 15:29:38 -04:00
Dave Reisner
e16d57b2c2 arch-chroot: shift off first arg as chrootdir 2012-09-06 09:40:34 -04:00
Pierre Schmitz
d571cb4ec4 arch-chroot: Default to /bin/bash as shell
By default chroot uses SHELL as default shell on the target if not specified otherwise.
As our install iso uses zsh this might fail if zsh is not installed on the target.

[dave: changed shell to /bin/sh]
2012-08-03 19:48:08 -04:00
Dave Reisner
71a4471d25 Revert "arch-chroot: default to /bin/sh when no command given"
This doesn't actually work since we don't shift off the chroot
directory.

This reverts commit 67c4b0fd24.
2012-08-03 19:47:26 -04:00
Dave Reisner
67c4b0fd24 arch-chroot: default to /bin/sh when no command given
chroot(1) will default to ${SHELL:-/bin/sh} which might not work, given
SHELL being /bin/zsh instead. Immediately default to /bin/sh, which will
exist in any sane chroot.
2012-08-03 19:07:03 -04:00
Dave Reisner
05b36e029c arch-chroot: umount /etc/resolv.conf as part of trap 2012-07-15 10:09:49 -04:00
Dave Reisner
1d9c98c5ee enforce user-specified root directory
Remove the -r option, forcing the user to explicitly pass a root
directory. This removes some confusion wherein we set defaults, but
wouldn't allow all the defaults to be accepted.

This also adds some mild documentation to the help output for genfstab
and pacstrap.
2012-07-15 10:07:11 -04:00
Dave Reisner
49e855638e use intermediate var for chrootdir
the trap won't necessarily have the same positional parameters.
2012-06-20 10:25:18 -04:00
Dave Reisner
542e888b48 pacstrap/arch-chroot: require root privileges to run
Suggested by Pierre. This makes sense since somewhere along the line,
pacman or mount are going to complain.
2012-06-19 08:13:52 -04:00
Dave Reisner
e5c1e4dd87 arch-chroot: use a trap to teardown the chroot 2012-06-18 16:58:25 -04:00
Pierre Schmitz
9307f3d1dd Mount /etc/resolv.conf into chroot environment
The ability to resolve DNS queries is espicially useful for arch-chroot.

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-18 11:58:30 +02:00
Pierre Schmitz
6fcfe3b268 Create a project Makefile
* the Makefile uses m4 to build the common lib into the scripts
* it includes install, uninstall and clean targets
* the dist target creates a source tar from a tag

Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
2012-06-18 11:17:42 +02:00