diff options
author | ficus <ficus@robocracy.org> | 2012-09-23 18:53:45 +0200 |
---|---|---|
committer | ficus <ficus@robocracy.org> | 2012-09-23 18:53:45 +0200 |
commit | 33f0a01e30ed9438debf6a7723cd93ff50effb04 (patch) | |
tree | 2dda7820e8651cd9b4a34abb0accd7e1a5434717 /freedom-maker/freedombox-customize | |
parent | 708bc689ab55c7bbcf6c9cde5f23e3389d53f6cf (diff) | |
download | torouter-33f0a01e30ed9438debf6a7723cd93ff50effb04.tar.gz torouter-33f0a01e30ed9438debf6a7723cd93ff50effb04.zip |
remove confusing unused packages
Diffstat (limited to 'freedom-maker/freedombox-customize')
-rwxr-xr-x | freedom-maker/freedombox-customize | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/freedom-maker/freedombox-customize b/freedom-maker/freedombox-customize deleted file mode 100755 index 1f3ee69..0000000 --- a/freedom-maker/freedombox-customize +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/python - -import crypt -import os -import subprocess -import sys - - -user = "fbx" -password = "frdm" -rootdir = sys.argv[1] -home = "/home/{0}/".format(user) - - -def runchroot(argv): - return runcmd(["chroot", rootdir] + argv) - -def runcmd(argv, stdin='', ignore_fail=False, **kwargs): - p = subprocess.Popen(argv, stdin=subprocess.PIPE, - stdout=subprocess.PIPE, stderr=subprocess.PIPE, - **kwargs) - out, err = p.communicate(stdin) - if p.returncode != 0: - msg = 'command failed: %s\n%s\n%s' % (argv, out, err) - if not ignore_fail: - print (msg) - raise Exception(msg) - return out - -if __name__ == "__main__": - print 'Customizing freedombox' - - # Create a fboxlite account. - runchroot(['adduser', '--gecos', user, '--disabled-password', user]) - encrypted = crypt.crypt(password, '..') - runchroot(['usermod', '-p', encrypted, user]) - - # Create all projects - runchroot(['git', 'clone', 'git://github.com/NickDaly/Plinth.git', - home + 'plinth']) - runchroot(['git', 'clone', 'git://github.com/jvasile/freedombox-privoxy', - home + 'freedombox-privoxy']) - runchroot(['git', 'clone', 'git://github.com/jvasile/withsqlite.git', - home + 'withsqlite']) - runchroot(['hg', 'clone', 'https://hg@bitbucket.org/nickdaly/plugserver', - home + 'plugserver']) - - # change home directory ownership appropriately - runchroot(['chown', '-R', '1000:1000', home]) |