加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rear-bz1692575.patch 2.13 KB
一键复制 编辑 原始数据 按行查看 历史
xzyang 提交于 2021-10-12 19:35 . update to rear-2.4-13.el7.src.rpm
diff -up rear-2.4/usr/share/rear/conf/GNU/Linux.conf.empty rear-2.4/usr/share/rear/conf/GNU/Linux.conf
--- rear-2.4/usr/share/rear/conf/GNU/Linux.conf.empty 2019-09-10 09:45:50.381285069 +0200
+++ rear-2.4/usr/share/rear/conf/GNU/Linux.conf 2019-09-10 09:45:50.421284309 +0200
@@ -276,6 +276,6 @@ COPY_AS_IS_EXCLUDE=( "${COPY_AS_IS_EXCLU
# some stuff for the Linux command line
KERNEL_CMDLINE="$KERNEL_CMDLINE selinux=0"
# common users and groups
-CLONE_USERS=( "${CLONE_USERS[@]:-}" daemon rpc usbmuxd usbmux vcsa nobody dbus )
-CLONE_GROUPS=( "${CLONE_GROUPS[@]:-}" tty usbmuxd usbmux fuse kvm oinstall dbus )
+CLONE_USERS+=( daemon rpc usbmuxd usbmux vcsa nobody dbus )
+CLONE_GROUPS+=( tty usbmuxd usbmux fuse kvm oinstall dbus )
diff -up rear-2.4/usr/share/rear/rescue/default/900_clone_users_and_groups.sh.empty rear-2.4/usr/share/rear/rescue/default/900_clone_users_and_groups.sh
--- rear-2.4/usr/share/rear/rescue/default/900_clone_users_and_groups.sh.empty 2018-06-21 10:40:53.000000000 +0200
+++ rear-2.4/usr/share/rear/rescue/default/900_clone_users_and_groups.sh 2019-09-10 09:45:50.421284309 +0200
@@ -40,6 +40,8 @@ local group=""
# because it should succeed when there is any non-empty array member, not necessarily the first one:
test "${CLONE_USERS[*]}" && Log "Cloning users: ${CLONE_USERS[@]}"
for user in "${CLONE_USERS[@]}" ; do
+ # Skip empty user values, cf. https://github.com/rear/rear/issues/2220
+ test $user || continue
# Skip if the user exists already in the ReaR recovery system:
grep -q "^$user:" $ROOTFS_DIR/etc/passwd && continue
# Skip if the user does not exist in the current system:
@@ -78,6 +80,8 @@ done
# because it should succeed when there is any non-empty array member, not necessarily the first one:
test "${CLONE_GROUPS[*]}" && Log "Cloning groups: ${CLONE_GROUPS[@]}"
for group in "${CLONE_GROUPS[@]}" ; do
+ # Skip empty group values, cf. https://github.com/rear/rear/issues/2220
+ test $group || continue
# Skip if the group exists already in the ReaR recovery system:
grep -q "^$group:" $ROOTFS_DIR/etc/group && continue
# Skip if the group does not exist in the current system:
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化