Add a rootcheck, stolen from livecd-creator

This commit is contained in:
Jesse Keating 2007-08-26 19:48:49 -04:00 committed by Jesse Keating
parent 85620199c0
commit a578d93a9e
3 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,7 @@
* Sun Aug 26 2007 Jesse Keating <jkeating@redhat.com>
- Add better support for %packages syntax using native pykickstart
- Add a cache dir for pungi (/var/cache/pungi) and a cli option to override
- Add root check.
* Sat Aug 25 2007 Jesse Keating <jkeating@redhat.com>
- Use a kickstart file as input now (for cdsize and package manifest)

2
ToDo
View File

@ -50,7 +50,7 @@ DONE ^^
Drop all stuff but GPL, README, GPG keys, potentially README-BURNING-ISOS ?
* From livecd-creator
Steal root check
Steal root check *DONE*
Use same cli syntax if possible (conf -> config, etc..)
* Figure out how to allow use of $releasever and $basearch

6
pungi
View File

@ -22,6 +22,12 @@ import pykickstart.version
from ConfigParser import SafeConfigParser
def main():
# You must be this high to ride.
if os.geteuid () != 0:
print >> sys.stderr, "You must run livecd-creator as root"
return 1
# Set some default variables, can be overrided in config file
# Turn this into a dict someday, to iterate over when setting defaults