Skip to content

Commit

Permalink
- added 'kvm' group to CLONE_GROUPS variable;
Browse files Browse the repository at this point in the history
- introduced TMPDIR variable to assist (user-defined prefix) the mktemp command. However, we should make sure that in rescue mode the TMPDIR variable is unset so the mktemp creates the BUILD_DIR under /tmp/rear.XXXXX (issue #323 and #157). By setting TMPDIR in local.conf we can choose were the BUILD_DIR resides (as it also contains the large ISO image);

- when we backup to ISO image make sure that the isofs module is copied to the rescue image (issue #326)
  • Loading branch information
gdha committed Nov 29, 2013
1 parent 6bb746a commit 179fd64
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion usr/share/rear/conf/GNU/Linux.conf
Expand Up @@ -221,4 +221,4 @@ COPY_AS_IS_EXCLUDE=( ${COPY_AS_IS_EXCLUDE[@]} dev/shm/\* )
KERNEL_CMDLINE="$KERNEL_CMDLINE selinux=0"
# common users and groups
CLONE_USERS=( "${CLONE_USERS[@]}" daemon rpc usbmuxd usbmux vcsa nobody)
CLONE_GROUPS=( "${CLONE_GROUPS[@]}" tty usbmuxd usbmux fuse )
CLONE_GROUPS=( "${CLONE_GROUPS[@]}" tty usbmuxd usbmux fuse kvm )
6 changes: 6 additions & 0 deletions usr/share/rear/conf/default.conf
Expand Up @@ -735,3 +735,9 @@ WAIT_SECS=30
# instead of the internal ones (no success guaranteed although). E.g. in case the destination has no internal disks.
# making the variable (y,Y,1) to enable
BOOT_OVER_SAN=

# the TMPDIR influences the mktemp command to define an alternative basedir instead of /tmp
# useful in case he /tmp is not large enough to contain ISO images and/or backup archives
# be careful the directory MUST exist otherwise you will get an error by mktemp
TMPDIR=""
export TMPDIR # the export is required so that mktemp can pickup the variable
11 changes: 11 additions & 0 deletions usr/share/rear/prep/ISO/GNU/Linux/34_add_isofs_module.sh
@@ -0,0 +1,11 @@
# if $scheme=iso then we must have isofs module in rescue mode so that we can
# loopback mount the ISO containing the backup
# BACKUP_URL=iso://backup

local scheme=$(url_scheme $BACKUP_URL)

case "$scheme" in
(iso)
MODULES=( ${MODULES[@]} isofs )
;;
esac
@@ -0,0 +1,8 @@
cat - <<EOF >> "$ROOTFS_DIR/etc/rear/rescue.conf"
# TMPDIR variable may be defined in local.conf file as prefix dir for mktemp command
# e.g. by defining TMPDIR=/var we would get our BUILD_DIR=/var/tmp/rear.XXXXXXXXXXXX
# However, in rescue we want our BUILD_DIR=/tmp/rear.XXXXXXX as we are not sure that
# the user defined TMPDIR would exist in our rescue image
# by 'unset TMPDIR' we achieve above goal (as rescue.conf is read after local.conf)!
unset TMPDIR
EOF

0 comments on commit 179fd64

Please sign in to comment.