|
|
@ -16,28 +16,25 @@
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
|
|
while true;
|
|
|
|
OUT=`/usr/lib/update-notifier/apt-check 2>&1`
|
|
|
|
do
|
|
|
|
oldIFS=$IFS
|
|
|
|
OUT=`/usr/lib/update-notifier/apt-check 2>&1`
|
|
|
|
IFS=';'
|
|
|
|
oldIFS=$IFS
|
|
|
|
j=0
|
|
|
|
IFS=';'
|
|
|
|
for STRING in $OUT; do
|
|
|
|
j=0
|
|
|
|
case $j in
|
|
|
|
for STRING in $OUT; do
|
|
|
|
0)
|
|
|
|
case $j in
|
|
|
|
UPG=$STRING;;
|
|
|
|
0)
|
|
|
|
1)
|
|
|
|
UPG=$STRING;;
|
|
|
|
SEC=$STRING;;
|
|
|
|
1)
|
|
|
|
esac
|
|
|
|
SEC=$STRING;;
|
|
|
|
j=`expr $j + 1`
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
j=`expr $j + 1`
|
|
|
|
IFS=$oldIFS
|
|
|
|
done
|
|
|
|
|
|
|
|
IFS=$oldIFS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NEWREL_CHECK=`/usr/bin/do-release-upgrade -c 2>&1`
|
|
|
|
NEWREL_CHECK=`/usr/bin/do-release-upgrade -c 2>&1`
|
|
|
|
NEWREL=$?
|
|
|
|
NEWREL=$?
|
|
|
|
if [ "$NEWREL" -eq 0 ]; then
|
|
|
|
if [ "$NEWREL" -eq 0 ]; then
|
|
|
|
VERSION=`echo $NEWREL_CHECK | awk -F\' '/available/{print $2}'`
|
|
|
|
VERSION=`echo $NEWREL_CHECK | awk -F\' '/available/{print $2}'`
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
/usr/libexec/lubuntu-update-notifier/lubuntu-notifier.py -u $UPG -s $SEC -r $NEWREL -v $VERSION -p /usr/bin/lubuntu-upgrader
|
|
|
|
|
|
|
|
sleep 86400
|
|
|
|
/usr/libexec/lubuntu-update-notifier/lubuntu-notifier.py -u $UPG -s $SEC -r $NEWREL -v $VERSION -p /usr/bin/lubuntu-upgrader
|
|
|
|
done;
|
|
|
|
|
|
|
|