git: 25e00a2894ea - stable/12 - Fix daily_backup_gpart_exclude in periodic daily 221.backup-gpart

Ed Maste emaste at FreeBSD.org
Mon Jan 4 18:47:55 UTC 2021


The branch stable/12 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=25e00a2894ea4ea2cbe64f25d9f3d99b60d1ea32

commit 25e00a2894ea4ea2cbe64f25d9f3d99b60d1ea32
Author:     Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2020-12-27 00:24:18 +0000
Commit:     Ed Maste <emaste at FreeBSD.org>
CommitDate: 2021-01-04 18:47:46 +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
    
    (cherry picked from commit 93900fc697992f893e2e69dce0c2f67b1f66a774)
---
 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


More information about the dev-commits-src-all mailing list