!29 修复iproute包未安装,导致/sbin/ip找不到的问题

Merge pull request !29 from co/ipnotfound-fix
This commit is contained in:
openeuler-ci-bot 2020-08-27 15:21:36 +08:00 committed by Gitee
commit 0b717b3443
2 changed files with 13 additions and 5 deletions

View File

@ -49,7 +49,11 @@ processes=$(ps aux | wc -l)
user_num=$(users | wc -w) user_num=$(users | wc -w)
# Ip address # Ip address
ip_pre=$(/sbin/ip a|grep inet|grep -v 127.0.0.1|grep -v inet6 | awk '{print $2}') ip_pre=""
if [ -x "/sbin/ip" ]
then
ip_pre=$(/sbin/ip a | grep inet | grep -v "127.0.0.1" | grep -v inet6 | awk '{print $2}')
fi
echo -e "\n" echo -e "\n"
echo -e "Welcome to $welcome\n" echo -e "Welcome to $welcome\n"
@ -67,8 +71,8 @@ done
echo -e "Users online: \t$user_num" echo -e "Users online: \t$user_num"
if [ "$whoiam"=="root" ] if [ "$whoiam"=="root" ]
then then
echo -e "\n" echo -e "\n"
else else
echo -e "To run a command as administrator(user \"root\"),use \"sudo <command>\"." echo -e "To run a command as administrator(user \"root\"),use \"sudo <command>\"."
fi fi

View File

@ -5,7 +5,7 @@
%define dist_release_version 8 %define dist_release_version 8
%define generic_version 20.03 %define generic_version 20.03
%define generic_patch_level LTS %define generic_patch_level LTS
%define generic_release 39 %define generic_release 40
%define builtin_release_version 1.0 %define builtin_release_version 1.0
%define current_arch %{_arch} %define current_arch %{_arch}
@ -136,10 +136,14 @@ rm -rf $RPM_BUILD_ROOT
/etc/profile.d/performance.sh /etc/profile.d/performance.sh
%changelog %changelog
* Thu Aug 20 2020 co <colo9@outlook.com> - 1.0-40
- fix bad date format in changelog
- /sbin/ip not found err fix
* Thu Aug 6 2020 zhangrui <zhangrui182@huawei.com> - 1.0-39 * Thu Aug 6 2020 zhangrui <zhangrui182@huawei.com> - 1.0-39
- modify system-info.sh to show more ip address when login - modify system-info.sh to show more ip address when login
* Fri June 19 2020 shenyangyang <shenyangyang4@huawei.com> - 1.0-38 * Fri Jun 19 2020 shenyangyang <shenyangyang4@huawei.com> - 1.0-38
- change build requires of python to python3 - change build requires of python to python3
* Mon May 18 2020 shenyangyang <shenyangyang4@huawei.com> - 1.0-37 * Mon May 18 2020 shenyangyang <shenyangyang4@huawei.com> - 1.0-37