File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,7 +110,12 @@ for CONFIG in $SNAPPER_CONFIGS; do
110110 [[ $SNAPSHOT == " no" ]] && continue
111111
112112 prefile=" /tmp/$argv0 -pre_$CONFIG "
113- snapper_cmd=" snapper --config $CONFIG create --type $pre_or_post --cleanup-algorithm $CLEANUP_ALGORITHM --print-number --description"
113+ if [ " $( stat -c %d:%i /) " != " $( stat -c %d:%i /proc/1/root/.) " ]; then
114+ printf " Disabling dbus in snapper call since chroot detected.\n"
115+ snapper_cmd=" snapper --no-dbus --config $CONFIG create --type $pre_or_post --cleanup-algorithm $CLEANUP_ALGORITHM --print-number --description"
116+ else
117+ snapper_cmd=" snapper --config $CONFIG create --type $pre_or_post --cleanup-algorithm $CLEANUP_ALGORITHM --print-number --description"
118+ fi
114119
115120 if [[ " $pre_or_post " == " pre" ]]; then
116121 x=$( $snapper_cmd " $( truncate_description $PRE_DESCRIPTION ) " )
You can’t perform that action at this time.
0 commit comments