Skip to content

Commit

Permalink
scimage: use -f for all rm/mv commands in cleanup()
Browse files Browse the repository at this point in the history
  • Loading branch information
jtriley committed Jan 8, 2013
1 parent 1b73620 commit 2d38869
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions utils/scimage.py
Expand Up @@ -551,9 +551,9 @@ def configure_init():


def cleanup():
run_command('rm /etc/resolv.conf')
run_command('rm /etc/mtab')
run_command('rm -f /etc/resolv.conf')
run_command('rm -rf /var/run/resolvconf')
run_command('rm -f /etc/mtab')
run_command('rm -rf /root/*')
exclude = ['/root/.bashrc', '/root/.profile', '/root/.bash_aliases']
for dot in glob.glob("/root/.*"):
Expand All @@ -566,9 +566,8 @@ def cleanup():
run_command('rm -f /var/cache/apt/archives/partial/*')
for f in glob.glob('/etc/profile.d'):
if 'byobu' in f:
run_command('rm %s' % f)
run_command('rm -f %s' % f)
if os.path.islink('/sbin/initctl') and os.path.isfile('/sbin/initctl.bak'):
run_command('rm /sbin/initctl')
run_command('mv -f /sbin/initctl.bak /sbin/initctl')


Expand Down

0 comments on commit 2d38869

Please sign in to comment.