fix env restore selinux_flag

This commit is contained in:
c30025131 2023-10-19 14:58:36 +08:00
parent 353f4d7b3d
commit 080f5acd58
2 changed files with 9 additions and 4 deletions

View File

@ -95,10 +95,10 @@ index 0000000..15f6311
+{
+ # 使用环境变量执行恢复
+ source /etc/profile >> /dev/null
+ if [ "x$SELINUX_FLAG" == "x0" ] || [ "x$SELINUX_FLAG" == "x1" ]; then
+ setenforce "${SELINUX_FLAG}"
+ if [ "x$selinux_flag" == "x0" ] || [ "x$selinux_flag" == "x1" ]; then
+ setenforce "${selinux_flag}"
+ else
+ echo "/etc/profile have no value: SELINUX_FLAG"
+ echo "/etc/profile have no value: selinux_flag"
+ fi
+}
+

View File

@ -11,7 +11,7 @@ Summary: a building tool for DVD ISO making and ISO cutting
License: Mulan PSL v2
Group: System/Management
Version: 2.0.3
Release: 9
Release: 10
BuildRoot: %{_tmppath}/%{name}
Source: https://gitee.com/openeuler/oemaker/repository/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
@ -135,6 +135,11 @@ rm -rf %{buildroot}
rm -rf $RPM_BUILD_DIR/%{name}
%changelog
* Thu Oct 19 2023 chenhuihan <chenhuihan@huawei.com> - 2.0.3-10
- ID:NA
- SUG:NA
- DESC: fix env restore bug
* Tue Oct 17 2023 xiangyuning <xiangyuning@huawei.com> - 2.0.3-9
- ID:NA
- SUG:NA