LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-28-2012, 09:02 PM   #1
wakrein
Member
 
Registered: Aug 2009
Posts: 40

Rep: Reputation: 15
A Script to Update Linux on boot


So i want to create a script that updates Kubuntu on boot.
So far i got:
Code:
#!/bin/bash
sudo -u root sudo apt-get update && sudo -u root apt-get upgrade
Hope this looks good, if it does my next question is... Do i drop this script in /etc/init.d/ ? If not where? Thanks for your help guys.

Last edited by wakrein; 06-30-2012 at 02:01 AM.
 
Old 06-29-2012, 04:08 AM   #2
truboy
Member
 
Registered: Oct 2010
Location: Switzerland
Posts: 84

Rep: Reputation: 9
Hi,

From this site, it seems that you can just add your script to /etc/rc.local, without removing the exit 0 in the end.
 
Old 06-30-2012, 01:54 AM   #3
wakrein
Member
 
Registered: Aug 2009
Posts: 40

Original Poster
Rep: Reputation: 15
I got it! rc.local starts before kde is opperational. So i figured there must be some script i can use after KDE ititializes found it in /home/user/.kde/Autostart/. Put my auto update script there
Code:
!/bin/sh -e
sudo apt-get update && sudo apt-get -y upgrade && kdialog --msgbox "Linux Update Successful"
exit 0
-y for yes prompt i think.

I wish there was a way to inform me if it didnt work
 
Old 06-30-2012, 01:58 AM   #4
kindofabuzz
Member
 
Registered: Mar 2010
Location: There
Distribution: Linux Mint 17.1
Posts: 237

Rep: Reputation: 45
Kubuntu doesn't have something that already checks for updates at starup? i'm sure it does.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux dual boot and update advice KarenWest Linux - Distributions 10 11-11-2011 04:28 PM
[SOLVED] Adding start up script in rcX.d --> Via update-rc SCRIPT defaults .... :-( jv2112 Linux - Newbie 6 07-04-2011 07:19 AM
Kernel update => no more boot linux COZSMIN Linux - Newbie 2 04-15-2008 03:15 PM
Shell Script: want to insert values in database when update script runs ring Programming 2 10-25-2007 11:48 PM


All times are GMT -5. The time now is 10:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration