diff options
Diffstat (limited to 'install-files/essential-files/usr')
-rw-r--r-- | install-files/essential-files/usr/bin/brpaste | 29 | ||||
-rw-r--r-- | install-files/essential-files/usr/lib/os-release | 5 | ||||
-rw-r--r-- | install-files/essential-files/usr/lib/tmpfiles.d/shutdownramfs.conf | 4 |
3 files changed, 38 insertions, 0 deletions
diff --git a/install-files/essential-files/usr/bin/brpaste b/install-files/essential-files/usr/bin/brpaste new file mode 100644 index 00000000..d2f9d867 --- /dev/null +++ b/install-files/essential-files/usr/bin/brpaste @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 + +import urllib.request +import os +import json + +URL = 'http://paste.baserock.org/documents' + +def run(*args): + if args: + content = [open(x).read() for x in args] + extensions = [os.path.splitext(x)[1] for x in args] + else: + content = [sys.stdin.read()] + extensions = [None] + + for i, each in enumerate(content): + req = urllib.request.Request(URL, each.encode('utf-8')) + response = urllib.request.urlopen(req) + the_page = response.read().decode('utf-8') + key = json.loads(the_page)['key'] + url = "http://paste.baserock.org/%s" % key + if extensions[i]: + url += extensions[i] + print(url) + +if __name__ == '__main__': + import sys + sys.exit(run(*sys.argv[1:])) diff --git a/install-files/essential-files/usr/lib/os-release b/install-files/essential-files/usr/lib/os-release new file mode 100644 index 00000000..b729c75f --- /dev/null +++ b/install-files/essential-files/usr/lib/os-release @@ -0,0 +1,5 @@ +NAME="Baserock" +ID=baserock +HOME_URL="http://wiki.baserock.org" +SUPPORT_URL="http://wiki.baserock.org/mailinglist" +BUG_REPORT_URL="http://wiki.baserock.org/mailinglist" diff --git a/install-files/essential-files/usr/lib/tmpfiles.d/shutdownramfs.conf b/install-files/essential-files/usr/lib/tmpfiles.d/shutdownramfs.conf new file mode 100644 index 00000000..174f1f03 --- /dev/null +++ b/install-files/essential-files/usr/lib/tmpfiles.d/shutdownramfs.conf @@ -0,0 +1,4 @@ +# If /usr/lib/shutdownramfs has been populated, copy it into /run/initramfs so +# /run/initramfs/shutdown will be executed on shut-down, so that it may unmount +# the rootfs. +C /run/initramfs - - - - /usr/lib/shutdownramfs |