Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Dec 2020 00:27:27 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 93900fc69799 - main - Fix daily_backup_gpart_exclude in periodic daily 221.backup-gpart
Message-ID:  <202012270027.0BR0RRNo032469@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=93900fc697992f893e2e69dce0c2f67b1f66a774

commit 93900fc697992f893e2e69dce0c2f67b1f66a774
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2020-12-27 00:24:18 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2020-12-27 00:27:12 +0000

    Fix daily_backup_gpart_exclude in periodic daily 221.backup-gpart
    
    Since gpart_devs was not quoted (losing embedded newlines), if
    daily_backup_gpart_exclude matched something, gpart_devs was empty.
    
    PR:             251961
    Submitted by:   Kan Sasaki
    MFC after:      1 week
---
 usr.sbin/periodic/etc/daily/221.backup-gpart | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/periodic/etc/daily/221.backup-gpart b/usr.sbin/periodic/etc/daily/221.backup-gpart
index d71bd8ffe12a..b2bfde820272 100755
--- a/usr.sbin/periodic/etc/daily/221.backup-gpart
+++ b/usr.sbin/periodic/etc/daily/221.backup-gpart
@@ -54,7 +54,7 @@ case "$daily_backup_gpart_enable" in
 
 	gpart_devs=$(gpart show | awk '$1 == "=>" { print $4 }')
 	if [ -n "$daily_backup_gpart_exclude" ]; then
-		gpart_devs=$(echo ${gpart_devs} | grep -E -v "${daily_backup_gpart_exclude}")
+		gpart_devs=$(echo "${gpart_devs}" | grep -E -v "${daily_backup_gpart_exclude}")
 	fi
 
 	if [ -z "$gpart_devs"  ]; then



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012270027.0BR0RRNo032469>