febootstrap-run [--options] DIR [--] [CMD ...]
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
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/bash
do_stuff ()
{
# complex operations inside the root
}
export -f do_stuff
febootstrap-run root -- bash -c do_stuff
export FAKECHROOT_EXCLUDE_PATH=/proc
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.