jobenvil Posted October 24, 2015 Posted October 24, 2015 Hello Igor, I want to put my own stuff inside motd. I'm not sure which scripts are responsible. In /var/run/motd.dynamic there is your banana text, but this is dinamically changing. how is the best approach to exchange the motd on your distros? Regards José
tkaiser Posted October 24, 2015 Posted October 24, 2015 https://duckduckgo.com/?q=motd+site%3Aforum.armbian.com 2
jobenvil Posted October 24, 2015 Author Posted October 24, 2015 Hi, thanks, somehow the search in the forum for "motd" doesn't work. I got a 404 error, but searching for other keywords wrked well. Many thanks,,, Im reading now... Here it is the key: root@locky ~ # toilet -f standard -F metal Banana Pro >> /var/run/motd.dynamic root@locky ~ # cat /var/run/motd.dynamic Linux locky 4.2.3-sunxi #2 SMP Sun Oct 11 14:12:18 CEST 2015 armv7l ____ ____ | __ ) __ _ _ __ __ _ _ __ __ _ | _ \ _ __ ___ | _ \ / _` | '_ \ / _` | '_ \ / _` | | |_) | '__/ _ \ | |_) | (_| | | | | (_| | | | | (_| | | __/| | | (_) | |____/ \__,_|_| |_|\__,_|_| |_|\__,_| |_| |_| \___/ root@locky ~ # beatifull thing this toilet, but it sound like toilette...
Igor Posted October 24, 2015 Posted October 24, 2015 Yes, this forum search thing is not ideal for our needs. Some extra tuning is needed but it goes down to the SQL level, converting some tables, or something .... Once ...
jobenvil Posted October 25, 2015 Author Posted October 25, 2015 thanks for the explanation! yes, I was thinking about if the keyword "motd" was producing some unexpected behaviour in the search process... I extended your file: root@locky ~ # vi /etc/init.d/armhwinfo adding one line more (#119) in the mentioned "armhwinfo" file, the script chooses the "banana pro" and the motd feeling looks like more accurate. 101 102 if [[ $KERNELID != "3.4" ]]; then 103 MACHINE=$(cat /proc/device-tree/model) 104 fi 105 106 if [[ $MACHINE == *LIME2 ]]; then ID="Lime 2"; fi 107 if [[ $MACHINE == *LIME ]]; then ID="Lime"; fi 108 if [[ $MACHINE == *Micro ]]; then ID="Micro"; fi 109 if [[ $MACHINE == *Banana* ]]; then ID="Banana"; fi 110 if [[ $MACHINE == *Udoo* ]]; then ID="udoo"; fi 111 if [[ $MACHINE == *Lamobo* ]]; then ID="Lamobo R1"; fi 112 if [[ $MACHINE == *Orange* ]]; then ID="Orange"; fi 113 if [[ $MACHINE == *Neo* ]]; then ID="Udoo Neo"; fi 114 if [[ $MACHINE == *Cubietruck* ]]; then ID="Cubietruck"; fi 115 if [[ $MACHINE == *Cubieboard* ]]; then ID="Cubieboard"; fi 116 117 if [[ $MACHINE == *M2* ]]; then ID=$ID" M2"; fi 118 # added by me 24.10.2015 119 if [[ $MACHINE == *Pro* ]]; then ID="Banana Pro"; fi and changing the parameters of toilet: 123 echo $ID >> /var/run/machine.id 124 125 echo "" > /var/run/motd.dynamic 126 # original below 127 #toilet -f standard -F metal "$ID" >> /var/run/motd.dynamic 128 # modified by me 24.10.2015 129 figlet-toilet -F border -F gay -f standard "$ID" >> /var/run/motd.dynamic 130 #echo "$DISTROID - $DISTROCODE - $KERNELID - $KERNELDATE" >> /var/run/motd.dynamic 131 echo "" >> /var/run/motd.dynamic to get something like this: https://locky.noip.me/f/9d7197c4a2/
Recommended Posts