febootstrap-run8
Run extra commands in febootstrap root filesystem
Usage
febootstrap-run [--options]
DIR
[--]
[CMD ...]
Overview
This can be used to run extra commands in the febootstrap root filesystem. It is just a simple wrapper around the standard "fakeroot" and "fakechroot" commands.
If given, the "CMD ..." is run inside the root filesystem. The command acts as if it was run as root and chrooted into the root filesystem.
If the command is omitted, then we start a shell.
If "CMD ..." could contain anything starting with a "-" character then use "--" to separate "febootstrap-run" parameters from the command:
febootstrap-run ./f10 -- ls -l
Options
-
--ro -
Usually any changes to permissions made by the command are recorded in the
"fakeroot.log"file. However if"--ro"flag is given, then changes to permissions are not recorded. (Note: changes to file contents still happen).
Examples
Remove a directory subtree safely:
febootstrap-run initramfs -- rm -r /etc
(This requires that you have a compatible 'rm' command in the root).
Another way to do complex operations from a script is to export a function:
#!/bin/bashdo_stuff (){# complex operations inside the root}export -f do_stufffebootstrap-run root -- bash -c do_stuff
Environment
Some fakechroot(1) environment variables are applicable. In particular you may want to set:
export FAKECHROOT_EXCLUDE_PATH=/proc