commit
a533b52adc
@ -1,4 +1,4 @@
|
||||
#/bin/sh
|
||||
#/bin/bash
|
||||
#Copyright (c) [2019] Huawei Technologies Co., Ltd.
|
||||
#generic-release is licensed under the Mulan PSL v1.
|
||||
#You can use this software according to the terms and conditions of the Mulan PSL v1.
|
||||
@ -13,10 +13,10 @@
|
||||
welcome=$(uname -r)
|
||||
|
||||
# Memory
|
||||
memory_usage=$(free -m | awk '/Mem:/ { printf("%3.1f%%", $3/$2*100) }')
|
||||
memory_usage=$(free -m | awk '/Mem:/ { printf("%3.1f%%", $3/$2*100)}')
|
||||
|
||||
# Swap memory
|
||||
swap_mem=$(free -m | awk '/Swap:/ { printf("%3.1f%%", $3/$2*100) }')
|
||||
swap_mem=$(free -m | awk '/Swap:/ { printf("%3.1f%%", $3/$2*100)}')
|
||||
|
||||
# Usage
|
||||
usageof=$(df -h / | awk '/\// {print $(NF-1)}')
|
||||
@ -37,7 +37,8 @@ processes=$(ps aux | wc -l)
|
||||
user_num=$(users | wc -w)
|
||||
|
||||
# Ip address
|
||||
ip_address=$(/sbin/ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6 | awk '{print $2}' | tr -d "addr:")
|
||||
ip_pre=$(/sbin/ip a|grep inet|grep -v 127.0.0.1|grep -v inet6 | awk '{print $2}' | head -1)
|
||||
ip_address=${ip_pre%/*}
|
||||
|
||||
echo -e "\n"
|
||||
echo -e "Welcome to $welcome\n"
|
||||
@ -54,5 +55,4 @@ then
|
||||
echo -e "\n"
|
||||
else
|
||||
echo -e "To run a command as administrator(user \"root\"),use \"sudo <command>\"."
|
||||
echo "See "man sudo_root" for details"
|
||||
fi
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
%define dist_release_version 8
|
||||
%define generic_version 1.0
|
||||
%define generic_patch_level %{nil}
|
||||
%define generic_release 21
|
||||
%define generic_release 22
|
||||
%define builtin_release_version 1.0
|
||||
|
||||
%define current_arch %{_arch}
|
||||
@ -117,6 +117,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
/usr/share/eula/eula.*
|
||||
|
||||
%changelog
|
||||
* Tue Jan 7 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.0-22
|
||||
- fix welcome information
|
||||
|
||||
* Fri Dec 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.0-21
|
||||
- Delete unneeded info
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user