uwu

hardware bitcoin wallet software and build system
git clone https://git.parazyd.org/uwu
Log | Files | Refs | README | LICENSE

install.sh.in (1398B)


      1 #!/bin/sh
      2 # Copyright (c) 2020-2021 Ivan J. <parazyd@dyne.org>
      3 # This file is part of uwu.
      4 # See LICENSE file for copyright and license details.
      5 set -e
      6 
      7 # Clean up some static files from the chroot tarball
      8 rm -f /etc/shadow /etc/alpine-release /etc/issue /etc/os-release
      9 
     10 cat <<EOF > /etc/apk/repositories
     11 https://nl.alpinelinux.org/alpine/edge/main
     12 https://nl.alpinelinux.org/alpine/edge/community
     13 https://nl.alpinelinux.org/alpine/edge/testing
     14 EOF
     15 
     16 echo "nameserver 8.8.8.8" > /etc/resolv.conf
     17 
     18 apk update
     19 apk upgrade
     20 apk add rng-tools openrc libsecp256k1 py3-cryptography alpine-base
     21 
     22 #rm -f /etc/resolv.conf
     23 
     24 echo "uwu" > /etc/hostname
     25 echo "127.0.0.1 localhost uwu" > /etc/hosts
     26 
     27 echo "@ROOTCREDENTIALS@" | chpasswd
     28 
     29 sed -e 's/^#rc_parallel=.*/rc_parallel="YES"/' \
     30 	-e 's/^#unicode=.*/unicode="NO"/' \
     31 	-e 's/^rc_tty_number=.*/rc_tty_number=1/' \
     32 	-i /etc/rc.conf
     33 
     34 cat <<EOF > /etc/inittab
     35 # /etc/inittab
     36 ::sysinit:/sbin/openrc sysinit
     37 ::sysinit:/sbin/openrc boot
     38 ::wait:/sbin/openrc default
     39 ::shutdown:/sbin/openrc shutdown
     40 ttyGS0::respawn:/sbin/getty -L ttyGS0 115200 vt100
     41 EOF
     42 
     43 echo "ttyGS0" >> /etc/securetty
     44 
     45 boot_initscripts="rngd urandom hostname sysfs devfs sysctl"
     46 default_initscripts="local"
     47 for i in $boot_initscripts; do
     48 	rc-update add "$i" boot
     49 done
     50 
     51 for i in $default_initscripts; do
     52 	rc-update add "$i" default
     53 done
     54 
     55 # Final cleanup
     56 rm -f /etc/shadow- /etc/group- /etc/passwd-