Loading register.sh +10 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Register to partage cd $(dirname $0) if [ -z "$1" ] then hostname=`hostname` Loading @@ -27,4 +28,12 @@ rhost="$(hostname -I | cut -d . -f -3).3" rport=9998 mac=$(ip -o link | awk '/state UP/{print $17}') IP=$(hostname -I) echo "$mac $hostname $IP" | netcat $rhost $rport # Number of upgrades apt_upgrades=$(apt-get --just-print upgrade | grep "^[0-9]* \(mis à jour\|upgraded\)" | cut -d ' ' -f 1) debian_version=$(cat /etc/debian_version | cut -d '/' -f 1) primtux_version=$(cat /etc/primtux_version | sed -e 's/ /_/g' ) git_branch=$(git branch | awk '/^\*/{print $2}' | sed -e 's/ /_/g') git_count=$(git rev-list --count $git_branch..origin/$git_branch) # Format mac name ip number_apt_upgrade debian_version primtux_version git_branch number_git_updates echo "$mac $hostname $IP $apt_upgrades $debian_version $primtux_version $git_branch $git_count" \ | netcat $rhost $rport update_configurations.sh +1 −0 Original line number Diff line number Diff line Loading @@ -35,3 +35,4 @@ run_script fix_firefox.sh run_script fix_proxy.sh run_script update_faces.sh run_script install_orca.sh run_script register.sh Loading
register.sh +10 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Register to partage cd $(dirname $0) if [ -z "$1" ] then hostname=`hostname` Loading @@ -27,4 +28,12 @@ rhost="$(hostname -I | cut -d . -f -3).3" rport=9998 mac=$(ip -o link | awk '/state UP/{print $17}') IP=$(hostname -I) echo "$mac $hostname $IP" | netcat $rhost $rport # Number of upgrades apt_upgrades=$(apt-get --just-print upgrade | grep "^[0-9]* \(mis à jour\|upgraded\)" | cut -d ' ' -f 1) debian_version=$(cat /etc/debian_version | cut -d '/' -f 1) primtux_version=$(cat /etc/primtux_version | sed -e 's/ /_/g' ) git_branch=$(git branch | awk '/^\*/{print $2}' | sed -e 's/ /_/g') git_count=$(git rev-list --count $git_branch..origin/$git_branch) # Format mac name ip number_apt_upgrade debian_version primtux_version git_branch number_git_updates echo "$mac $hostname $IP $apt_upgrades $debian_version $primtux_version $git_branch $git_count" \ | netcat $rhost $rport
update_configurations.sh +1 −0 Original line number Diff line number Diff line Loading @@ -35,3 +35,4 @@ run_script fix_firefox.sh run_script fix_proxy.sh run_script update_faces.sh run_script install_orca.sh run_script register.sh