mirror of
https://github.com/gutosie/neoboot.git
synced 2025-11-03 20:55:47 +01:00
Update tools.py
This commit is contained in:
@@ -1819,8 +1819,11 @@ class CreateSwap(Screen):
|
|||||||
cmd1 = 'dd if=/dev/zero of=' + myfile + ' bs=1024 count=' + swapsize + ' 2>/dev/null'
|
cmd1 = 'dd if=/dev/zero of=' + myfile + ' bs=1024 count=' + swapsize + ' 2>/dev/null'
|
||||||
cmd2 = 'mkswap ' + myfile
|
cmd2 = 'mkswap ' + myfile
|
||||||
cmd3 = 'echo "' + myfile+ ' swap swap defaults 0 0 " >> /etc/fstab'
|
cmd3 = 'echo "' + myfile+ ' swap swap defaults 0 0 " >> /etc/fstab'
|
||||||
cmd4 = 'echo "/sbin/swapon ' + myfile+ '; swapon -a " >> /etc/init.d/rcS.local'
|
if os.path.exists('/etc/init.d/rc.local'):
|
||||||
cmd5 = 'chmod 755 /etc/init.d/rcS.local; chmod 755 ' + myfile+ '; /sbin/swapon ' + myfile+ ''
|
cmd4 = 'echo "/sbin/swapon ' + myfile+ '; swapon -a " >> /etc/init.d/rc.local; chmod 755 /etc/init.d/rc.local'
|
||||||
|
else:
|
||||||
|
cmd4 = 'echo "/sbin/swapon ' + myfile+ '; swapon -a " >> /etc/init.d/rcS.local; chmod 755 /etc/init.d/rcS.local'
|
||||||
|
cmd5 = 'chmod 755 ' + myfile+ '; /sbin/swapon ' + myfile+ ''
|
||||||
cmd6 = "echo -e '\n\n%s '" % _('Creation complete swap ' + swapsize + '')
|
cmd6 = "echo -e '\n\n%s '" % _('Creation complete swap ' + swapsize + '')
|
||||||
self.session.open(Console, _('NeoBoot....'), [cmd0,
|
self.session.open(Console, _('NeoBoot....'), [cmd0,
|
||||||
cmd1,
|
cmd1,
|
||||||
|
|||||||
Reference in New Issue
Block a user