/sbin/ip not found fix & date format fix
This commit is contained in:
parent
2c0bea807b
commit
e8f0b7a6f5
@ -49,7 +49,11 @@ processes=$(ps aux | wc -l)
|
||||
user_num=$(users | wc -w)
|
||||
|
||||
# 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 "Welcome to $welcome\n"
|
||||
@ -67,8 +71,8 @@ done
|
||||
echo -e "Users online: \t$user_num"
|
||||
if [ "$whoiam"=="root" ]
|
||||
then
|
||||
echo -e "\n"
|
||||
echo -e "\n"
|
||||
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
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
%define dist_release_version 8
|
||||
%define generic_version 20.03
|
||||
%define generic_patch_level LTS
|
||||
%define generic_release 39
|
||||
%define generic_release 40
|
||||
%define builtin_release_version 1.0
|
||||
|
||||
%define current_arch %{_arch}
|
||||
@ -136,10 +136,14 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/etc/profile.d/performance.sh
|
||||
|
||||
%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
|
||||
- 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
|
||||
|
||||
* Mon May 18 2020 shenyangyang <shenyangyang4@huawei.com> - 1.0-37
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user