Commit Graph

17 Commits

Author SHA1 Message Date
Dave Reisner
8f2bd395ec common: introduce mount_conditionally
This is potentially evil, but we're using hand crafted input to eval
which should be safe. Use this to bind mount the chroot dir if it isn't
already a mount point.
2013-11-14 14:45:33 -05:00
Dave Reisner
463027b919 api_fs_mount: mount sysfs read-only 2013-10-02 21:08:05 -04:00
Dave Reisner
be7dcaa799 track_mount: lazily initialize track_mount trap/storage 2013-10-02 19:53:37 -04:00
Dave Reisner
c6af176666 genfstab: be more careful about assigning passno 2013-05-26 11:41:53 -04:00
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
b240f6ea90 common: declare pseudofs types as hash 2012-12-16 12:35:38 -05: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
bfb2b966f9 avoid limiting size of /tmp in chroot
There's no particularly good reason for this limitation.
2012-12-08 14:43:24 -05:00
Dave Reisner
3a7eb157d1 genfstab: provide DM names for swap
We're kind enough to provide DM names for non-swap devices, but simply
use the /dev/dm-X nodes for swap, since that's what /proc/swaps provides
us with. Resolve the DM name out of sysfs and use this instead.

Fixes FS#32609.
2012-11-11 17:04:14 -05:00
Dave Reisner
f8e7c4e29d direct error output to stderr 2012-06-25 22:33:38 -04:00
Dave Reisner
80ed096ccf arch-chroot: Only conditionally use a bind mount on chroot
This mainly fixes the case where there's devices mounted under the
chroot directory. Creating a bind mount on top of this will obscure
these other mounts.
2012-06-22 19:04:46 -04:00
Dave Reisner
f4a7a8313a fix xtrace output on api mount 2012-06-20 10:26:50 -04:00
Dave Reisner
b61c8cb366 move mangle to common, add unmangle, use in genfstab
The %b formatter is too generic for us to use, as a sequence such as
'\b' is invalid for hex escaping, but valid for %b. Port over the logic
from util-linux's mangle mini-lib and use this instead. This supports
both 3 digits hex as well as 3 digit octal escapes, and will ignore the
more generic ascii based single character escapes. Output is always in
octal format to comply with fstab(5).
2012-06-18 10:50:52 -04: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
Dave Reisner
67ec87fef0 be more verbose about chroot actions 2012-06-17 21:11:34 -04:00
Dave Reisner
2ace610c2f common: ensure the chroot point is a mountpoint 2012-06-17 17:08:27 -04:00
Dave Reisner
f614a4ee87 initial commit 2012-06-17 15:17:50 -04:00