Continue execution of a Python update script without waiting for user input

user2830135

I have written a simple script to carry out all my system updates and clean up on my Fedora 19 machine in one go:

import os

os.system('clear') # clear the terminal screen

os.system('yum -y update') # update the system without asking for confirmation

os.system('package-cleanup --oldkernels') 

os.system('package-cleanup --problems')

os.system('package-cleanup --dupes')

os.system('yum clean all')

exit()

The only issue is that in case there are old kernels to remove, the system will ask for user confirmation. How can I code this into the script, to automatically remove the old kernels without waiting for user confirmation?

Jayanth Koushik

Run package-cleanup with '-y' too.

package-cleanup -y --oldkernels

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Python script not waiting for user input when ran from piped bash script

From Dev

POST variables without waiting for the execution of the end side script

From Dev

POST variables without waiting for the execution of the end side script

From Dev

Python: Stop thread that is waiting for user input

From Dev

cancel script execution and continue

From Dev

Apps Script - Update the user on code execution status

From Dev

Read command in bash script not waiting for user input when piped to bash?

From Dev

Code executes all of onStartup() without waiting for user input in view

From Dev

Listening for user input without waiting to do other processes

From Dev

/bin/sh closes immediately without waiting for user input

From Dev

fgets not waiting for user input

From Dev

Quit waiting on user input

From Dev

Cin without waiting for input?

From Dev

Python: wait for user input, and if no input after 10 minutes, continue with program

From Dev

Retry user input in Python script

From Dev

python user input without console

From Dev

python user input without console

From Dev

Let Matlab continue without waiting for a result

From Dev

How to stop subprocess.Popen waiting for user input in python

From Dev

Python: Loop isn't waiting for user's input

From Dev

Python: Loop isn't waiting for user's input

From Dev

How can I launch a job from user interface without waiting for the end of execution?

From Dev

How to stop CasperJS execution and let the user input some value and then continue to execute?

From Dev

How to update and save a python script (variables only, no logic) based on user input?

From Dev

How to update and save a python script (variables only, no logic) based on user input?

From Dev

How to stop waiting for user input?

From Dev

Javascript - Waiting for user input (callbacks)

From Dev

Parallel.Invoke() without waiting on execution to finish

From Dev

What is the shortcut to continue script execution in Firebug on Mac?

Related Related

  1. 1

    Python script not waiting for user input when ran from piped bash script

  2. 2

    POST variables without waiting for the execution of the end side script

  3. 3

    POST variables without waiting for the execution of the end side script

  4. 4

    Python: Stop thread that is waiting for user input

  5. 5

    cancel script execution and continue

  6. 6

    Apps Script - Update the user on code execution status

  7. 7

    Read command in bash script not waiting for user input when piped to bash?

  8. 8

    Code executes all of onStartup() without waiting for user input in view

  9. 9

    Listening for user input without waiting to do other processes

  10. 10

    /bin/sh closes immediately without waiting for user input

  11. 11

    fgets not waiting for user input

  12. 12

    Quit waiting on user input

  13. 13

    Cin without waiting for input?

  14. 14

    Python: wait for user input, and if no input after 10 minutes, continue with program

  15. 15

    Retry user input in Python script

  16. 16

    python user input without console

  17. 17

    python user input without console

  18. 18

    Let Matlab continue without waiting for a result

  19. 19

    How to stop subprocess.Popen waiting for user input in python

  20. 20

    Python: Loop isn't waiting for user's input

  21. 21

    Python: Loop isn't waiting for user's input

  22. 22

    How can I launch a job from user interface without waiting for the end of execution?

  23. 23

    How to stop CasperJS execution and let the user input some value and then continue to execute?

  24. 24

    How to update and save a python script (variables only, no logic) based on user input?

  25. 25

    How to update and save a python script (variables only, no logic) based on user input?

  26. 26

    How to stop waiting for user input?

  27. 27

    Javascript - Waiting for user input (callbacks)

  28. 28

    Parallel.Invoke() without waiting on execution to finish

  29. 29

    What is the shortcut to continue script execution in Firebug on Mac?

HotTag

Archive