diff options
author | Jeff Bilyk <jbilyk@gmail.com> | 2011-06-08 22:16:14 +0000 |
---|---|---|
committer | Jeff Bilyk <jbilyk@gmail.com> | 2011-06-08 22:16:14 +0000 |
commit | 5ac7203533034845fed9ea4b7718e91ab58b2a7f (patch) | |
tree | 9a1229c12c402bf0032264d28e151457038b51c2 | |
parent | 6dbbe28a459e79acb9e7ba44d43295df9a0f45f8 (diff) | |
download | alpine-conf-5ac7203533034845fed9ea4b7718e91ab58b2a7f.tar.bz2 alpine-conf-5ac7203533034845fed9ea4b7718e91ab58b2a7f.tar.xz |
setup-apklbu: new script
setup-apklbu is a new script for setting up apk cache and lbu
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | setup-alpine.in | 1 | ||||
-rwxr-xr-x | setup-apklbu.in | 38 |
3 files changed, 40 insertions, 0 deletions
@@ -13,6 +13,7 @@ SBIN_FILES := lbu\ setup-ads\ setup-alpine\ setup-alpine-web\ + setup-apklbu\ setup-apkrepos\ setup-cryptswap\ setup-disk\ diff --git a/setup-alpine.in b/setup-alpine.in index a246ca0..0179ad9 100644 --- a/setup-alpine.in +++ b/setup-alpine.in @@ -76,3 +76,4 @@ $PREFIX/sbin/setup-apkrepos DEFAULT_DISK=none \ $PREFIX/sbin/setup-disk -q +$PREFIX/sbin/setup-apklbu diff --git a/setup-apklbu.in b/setup-apklbu.in new file mode 100755 index 0000000..91aac54 --- /dev/null +++ b/setup-apklbu.in @@ -0,0 +1,38 @@ +#!/bin/sh + +PREFIX= + +. "$PREFIX/lib/libalpine.sh" + +echo "Setup apk caching and lbu? (y/N)" +default_read setupapklbu + +if [ "$setupapklbu" == "Y" ] || [ "$setupapklbu" == "y" ]; then + continue=1 +fi + +if [ -z $continue ]; then + exit 0 +fi + +mountpoint="usb" +echo "Please enter mountpoint directory under /media for lbu ($mountpoint):" +default_read mountpoint "$mountpoint" +mkdir -p /media/${mountpoint}/cache || die "Failed to create /media/${mountpoint}/cache" +ln -s /media/${mountpoint}/cache /etc/apk/cache || die "Failed to create apk cache softlink" +cat > /etc/lbu/lbu.conf <<EOF +# what cipher to use with -e option +DEFAULT_CIPHER=aes-256-cbc + +# Uncomment the row below to encrypt config by default +# ENCRYPTION=$DEFAULT_CIPHER + +# Uncomment below to avoid <media> option to 'lbu commit' +# Can also be set to 'floppy' +LBU_MEDIA=$mountpoint + +# Uncomment below to let lbu make up to 3 backups +# BACKUP_LIMIT=3 +EOF +lbu package /media/"$mountpoint" || die "Failed to lbu apkovl on /media/${mountpoint}" +sync |