projects
/
grml-x.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add debian/control headers Origin, Bugs
[grml-x.git]
/
grml-x
diff --git
a/grml-x
b/grml-x
index
995b4c4
..
d3d225c
100755
(executable)
--- a/
grml-x
+++ b/
grml-x
@@
-1,4
+1,4
@@
-#!/usr/bin/
env python
+#!/usr/bin/
python2.6
# -*- coding: utf-8 -*-
# vim: set et ts=4:
# -*- coding: utf-8 -*-
# vim: set et ts=4:
@@
-9,6
+9,8
@@
# License: This file is licensed under the GPL v2.
###############################################################################
# License: This file is licensed under the GPL v2.
###############################################################################
+# Requires python 2.6 or, possibly, a newer version of python 2.X.
+
import fileinput, os, subprocess, sys, tempfile, time, traceback
from optparse import OptionParser
import fileinput, os, subprocess, sys, tempfile, time, traceback
from optparse import OptionParser
@@
-24,6
+26,8
@@
class Section(object):
v = self.data[k]
if isinstance(v, list):
v = '" "'.join(v)
v = self.data[k]
if isinstance(v, list):
v = '" "'.join(v)
+ elif not isinstance(v, basestring): # int, others
+ v = str(v)
elif '-' in v: # sync range
pass
else:
elif '-' in v: # sync range
pass
else:
@@
-70,7
+74,7
@@
def build_bootparams():
params = {}
for p in ' '.join(lines).split(' '):
if '=' in p:
params = {}
for p in ' '.join(lines).split(' '):
if '=' in p:
- (k,v) = p.split('=',
2
)
+ (k,v) = p.split('=',
1
)
params[k] = v
else:
params[p] = True
params[k] = v
else:
params[p] = True
@@
-142,7
+146,7
@@
def main():
(options, args) = parser.parse_args()
bootparams = build_bootparams()
(options, args) = parser.parse_args()
bootparams = build_bootparams()
- if os.getuid() == 0:
+ if os.getuid() == 0
and options.start_server
:
print "W: running as root is unsupported and may not work."
time.sleep(1)
print "W: running as root is unsupported and may not work."
time.sleep(1)
@@
-194,7
+198,7
@@
def main():
f.close()
f = open(xinitrc, 'w')
for line in lines:
f.close()
f = open(xinitrc, 'w')
for line in lines:
- if line.startswith('exec '): line = wm_exec
+ if line.st
rip().st
artswith('exec '): line = wm_exec
f.write(line)
os.fchmod(f.fileno(), 0750)
f.close()
f.write(line)
os.fchmod(f.fileno(), 0750)
f.close()