Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
mxtools/mxproxmox/proxmox-backup-client.wrapper
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
22 lines (19 sloc)
722 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Some proxmox-backup-client commands such as "catalog dump" don't work with | |
# /tmp on reiserfs. See https://bugzilla.proxmox.com/show_bug.cgi?id=3699 | |
# This wrapper can be used as a workaround. It runs proxmox-backup-client in | |
# its own mount namespace with a tmpfs filesystem mounted on /tmp. | |
if [ "$1" = "--setup-tmp" ]; then | |
shift | |
if [ "$(stat -L -c %i /proc/self/ns/mnt)" = "$(stat -L -c %i /proc/1/ns/mnt)" ];then | |
echo "$0 : --setup-tmp in init namespace" >&2 | |
exit 1; | |
fi | |
mount -t tmpfs /tmp /tmp | |
exec proxmox-backup-client "$@" | |
fi | |
if [ "$(stat -f -c %T /tmp)" = "reiserfs" ]; then | |
exec unshare -m $0 --setup-tmp "$@" | |
else | |
exec proxmox-backup-client "$@" | |
fi |