Only set the variable in the code path where we need it
authorAndrew Ruthven <andrew@etc.gen.nz>
Fri, 11 Jan 2019 11:25:28 +0000 (00:25 +1300)
committerAndrew Ruthven <andrew@etc.gen.nz>
Fri, 11 Jan 2019 11:25:28 +0000 (00:25 +1300)
bin/mythtv-update-motd

index b03bb2183fdd36ffff314851093f4f2d02bef44f..59a54f5240d8fcbb96a8d3f69072f4f0844888e4 100755 (executable)
@@ -21,7 +21,6 @@ then
 fi
 
 WORKFILE=/run/motd
-STUBFILE=/run/motd.orig
 TEMPFILE=/run/motd.mythtv-status
 
 if [ -d /etc/update-motd.d ]
@@ -35,6 +34,8 @@ else
   # We are going to generate an motd file to be used for the system,
   # with the previous content first, then the MythTV Status.
 
+  STUBFILE=/run/motd.orig
+
   if [ -f /etc/os-release ]
   then
     DISTRO=$(grep ^ID= /etc/os-release | awk -F= '{ print $2 }')