aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--handlers/rsync.in12
-rw-r--r--handlers/sys.in14
2 files changed, 24 insertions, 2 deletions
diff --git a/handlers/rsync.in b/handlers/rsync.in
index b2c4b59..d0c211c 100644
--- a/handlers/rsync.in
+++ b/handlers/rsync.in
@@ -284,6 +284,10 @@ function eval_config {
done
IFS=$SAVEIFS
set +o noglob
+
+ # Make sure we'll run bash at the destination
+ ssh_cmd="$ssh_cmd /bin/bash"
+
}
function rotate_short {
@@ -455,6 +459,8 @@ function rotate_long {
debug "daily.$max --> weekly.1"
$nice mv $backuproot/daily.$max $backuproot/weekly.1
mkdir -p $backuproot/metadata/weekly.1
+ # Update increment folder date and setup metadata
+ $touch $backuproot/weekly.1
date +%c%n%s > $backuproot/metadata/weekly.1/rotated
#if [ -f $backuproot/metadata/daily.$max/created ]; then
# $nice mv $backuproot/metadata/daily.$max/created $backuproot/metadata/weekly.1/
@@ -466,6 +472,8 @@ function rotate_long {
debug "weekly.$max --> monthly.1"
$nice mv $backuproot/weekly.$max $backuproot/monthly.1
mkdir -p $backuproot/metadata/monthly.1
+ # Update increment folder date and setup metadata
+ $touch $backuproot/monthly.1
date +%c%n%s > $backuproot/metadata/monthly.1/rotated
#if [ -f $backuproot/metadata/weekly.$max/created ]; then
# $nice mv $backuproot/metadata/weekly.$max/created $backuproot/metadata/weekly.1/
@@ -578,6 +586,8 @@ function rotate_long_remote {
echo "Debug: daily.\$max --> weekly.1"
$nice mv $backuproot/daily.\$max $backuproot/weekly.1
mkdir -p $backuproot/metadata/weekly.1
+ # Update increment folder date and setup metadata
+ $touch $backuproot/weekly.1
date +%c%n%s > $backuproot/metadata/weekly.1/rotated
#if [ -f $backuproot/metadata/daily.\$max/created ]; then
# $nice mv $backuproot/metadata/daily.\$max/created $backuproot/metadata/weekly.1/
@@ -589,6 +599,8 @@ function rotate_long_remote {
echo "Debug: weekly.\$max --> monthly.1"
$nice mv $backuproot/weekly.\$max $backuproot/monthly.1
mkdir -p $backuproot/metadata/monthly.1
+ # Update increment folder date and setup metadata
+ $touch $backuproot/monthly.1
date +%c%n%s > $backuproot/metadata/monthly.1/rotated
#if [ -f $backuproot/metadata/weekly.\$max/created ]; then
# $nice mv $backuproot/metadata/weekly.\$max/created $backuproot/metadata/weekly.1/
diff --git a/handlers/sys.in b/handlers/sys.in
index 55e0799..605e583 100644
--- a/handlers/sys.in
+++ b/handlers/sys.in
@@ -53,6 +53,11 @@ then
os=redhat
debug "Redhat detected"
osversion="/etc/redhat-release"
+elif [ -f /etc/SuSE-release ]
+then
+ os=suse
+ debug "SuSE detected"
+ osversion="/etc/SuSE-release"
else
warning "Unknown OS detected!"
fi
@@ -66,14 +71,14 @@ if [ ! -d $parentdir ]; then
mkdir -p $parentdir
fi
-if [ $os = "debian" ]
+if [ "$os" = "debian" ]
then
getconf packagesfile $parentdir/dpkg-selections.txt
getconf packagemgr `which dpkg`
getconf packagemgroptions ' --get-selections *'
getconf selectionsfile $parentdir/debconfsel.txt
getconf debconfgetselections `which debconf-get-selections`
-elif [ $os = "redhat" ]
+elif [ "$os" = "redhat" ]
then
getconf packagesfile $parentdir/rpmpackages.txt
getconf packagemgr `which rpm`
@@ -81,6 +86,11 @@ then
getconf SYSREPORT `which sysreport`
getconf sysreport_options ' -norpm '
+elif [ "$os" = "suse" ]
+then
+ getconf packagesfile $parentdir/rpmpackages.txt
+ getconf packagemgr `which rpm`
+ getconf packagemgroptions ' -qa '
else
getconf packagesfile $parentdir/unknownOS.txt
fi