3 febootstrap-run - Run extra commands in febootstrap root filesystem
7 febootstrap-run [--options] DIR [--] [CMD ...]
11 This can be used to run extra commands in the febootstrap root
12 filesystem. It is just a simple wrapper around the standard
13 C<fakeroot> and C<fakechroot> commands.
15 If given, the C<CMD ...> is run inside the root filesystem. The
16 command acts as if it was run as root and chrooted into the root
19 If the command is omitted, then we start a shell.
21 If C<CMD ...> could contain anything starting with a C<-> character
22 then use C<--> to separate C<febootstrap-run> parameters from the
25 febootstrap-run ./f10 -- ls -l
33 Usually any changes to permissions made by the command are recorded in
34 the C<fakeroot.log> file. However if C<--ro> flag is given, then
35 changes to permissions are not recorded. (Note: changes to file
36 contents still happen).
42 One way to create a new file with specific ownership and permissions
43 from a script is to create new content for a file as C<root/file.new>:
47 echo blah > root/file.new
49 then "install" it with the correct ownership and permissions.
51 febootstrap-run root -- install -m 0644 -o root -g root /file.new /file
54 (This requires that the C</usr/bin/install> command from coreutils
55 exists inside the root.)
57 Another way to do complex operations from a script is to export a
64 # complex operations inside the root
67 febootstrap-run root -- bash -c do_stuff
69 =head1 ENVIRONMENT VARIABLES
71 Some L<fakechroot(1)> environment variables are applicable. In
72 particular you may want to set:
74 export FAKECHROOT_EXCLUDE_PATH=/proc
84 Richard W.M. Jones <rjones @ redhat . com>
88 (C) Copyright 2009 Red Hat Inc.,
89 L<http://et.redhat.com/~rjones/febootstrap>.
91 This program is free software; you can redistribute it and/or modify
92 it under the terms of the GNU General Public License as published by
93 the Free Software Foundation; either version 2 of the License, or
94 (at your option) any later version.
96 This program is distributed in the hope that it will be useful,
97 but WITHOUT ANY WARRANTY; without even the implied warranty of
98 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
99 GNU General Public License for more details.
101 You should have received a copy of the GNU General Public License
102 along with this program; if not, write to the Free Software
103 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.