diff --git a/man/freedombone-addcert.1.gz b/man/freedombone-addcert.1.gz index 3efbd411..360e90cd 100644 Binary files a/man/freedombone-addcert.1.gz and b/man/freedombone-addcert.1.gz differ diff --git a/man/freedombone-addemail.1.gz b/man/freedombone-addemail.1.gz index 84c144cd..34b6517e 100644 Binary files a/man/freedombone-addemail.1.gz and b/man/freedombone-addemail.1.gz differ diff --git a/man/freedombone-addlist.1.gz b/man/freedombone-addlist.1.gz index 5bda7839..ae9d6961 100644 Binary files a/man/freedombone-addlist.1.gz and b/man/freedombone-addlist.1.gz differ diff --git a/man/freedombone-addsipuser.1.gz b/man/freedombone-addsipuser.1.gz index a14e8558..8d917cd2 100644 Binary files a/man/freedombone-addsipuser.1.gz and b/man/freedombone-addsipuser.1.gz differ diff --git a/man/freedombone-adduser.1.gz b/man/freedombone-adduser.1.gz index 2c24045f..f810a6df 100644 Binary files a/man/freedombone-adduser.1.gz and b/man/freedombone-adduser.1.gz differ diff --git a/man/freedombone-addxmpp.1.gz b/man/freedombone-addxmpp.1.gz index eded5a1a..9d001af7 100644 Binary files a/man/freedombone-addxmpp.1.gz and b/man/freedombone-addxmpp.1.gz differ diff --git a/man/freedombone-client.1.gz b/man/freedombone-client.1.gz index 45cf9036..b2106b68 100644 Binary files a/man/freedombone-client.1.gz and b/man/freedombone-client.1.gz differ diff --git a/man/freedombone-clientcert.1.gz b/man/freedombone-clientcert.1.gz index db58e972..88a55f48 100644 Binary files a/man/freedombone-clientcert.1.gz and b/man/freedombone-clientcert.1.gz differ diff --git a/man/freedombone-config.1.gz b/man/freedombone-config.1.gz index 38cb8a05..6be229c9 100644 Binary files a/man/freedombone-config.1.gz and b/man/freedombone-config.1.gz differ diff --git a/man/freedombone-controlpanel.1.gz b/man/freedombone-controlpanel.1.gz index c17bfae2..c081a7ff 100644 Binary files a/man/freedombone-controlpanel.1.gz and b/man/freedombone-controlpanel.1.gz differ diff --git a/man/freedombone-dhparam.1.gz b/man/freedombone-dhparam.1.gz index 8fb176cf..6baa529d 100644 Binary files a/man/freedombone-dhparam.1.gz and b/man/freedombone-dhparam.1.gz differ diff --git a/man/freedombone-format.1.gz b/man/freedombone-format.1.gz index c6a79218..8ecf9ca8 100644 Binary files a/man/freedombone-format.1.gz and b/man/freedombone-format.1.gz differ diff --git a/man/freedombone-ignore.1.gz b/man/freedombone-ignore.1.gz index d91f67d9..70ffc97a 100644 Binary files a/man/freedombone-ignore.1.gz and b/man/freedombone-ignore.1.gz differ diff --git a/man/freedombone-image.1.gz b/man/freedombone-image.1.gz index 5be0a0d3..c26f15b8 100644 Binary files a/man/freedombone-image.1.gz and b/man/freedombone-image.1.gz differ diff --git a/man/freedombone-keydrive.1.gz b/man/freedombone-keydrive.1.gz index 4ddbf545..84eda312 100644 Binary files a/man/freedombone-keydrive.1.gz and b/man/freedombone-keydrive.1.gz differ diff --git a/man/freedombone-logging.1.gz b/man/freedombone-logging.1.gz index de082449..8ca654d8 100644 Binary files a/man/freedombone-logging.1.gz and b/man/freedombone-logging.1.gz differ diff --git a/man/freedombone-mesh.1.gz b/man/freedombone-mesh.1.gz index 1b89cefc..67e9bfe1 100644 Binary files a/man/freedombone-mesh.1.gz and b/man/freedombone-mesh.1.gz differ diff --git a/man/freedombone-prep.1.gz b/man/freedombone-prep.1.gz deleted file mode 100644 index 9d4029b3..00000000 Binary files a/man/freedombone-prep.1.gz and /dev/null differ diff --git a/man/freedombone-recoverkey.1.gz b/man/freedombone-recoverkey.1.gz index 8293f3b8..c2968e52 100644 Binary files a/man/freedombone-recoverkey.1.gz and b/man/freedombone-recoverkey.1.gz differ diff --git a/man/freedombone-remote.1.gz b/man/freedombone-remote.1.gz index 6e50ad61..1b0c1daf 100644 Binary files a/man/freedombone-remote.1.gz and b/man/freedombone-remote.1.gz differ diff --git a/man/freedombone-renew-cert.1.gz b/man/freedombone-renew-cert.1.gz index 2266bc20..b9cc3f9d 100644 Binary files a/man/freedombone-renew-cert.1.gz and b/man/freedombone-renew-cert.1.gz differ diff --git a/man/freedombone-rmemail.1.gz b/man/freedombone-rmemail.1.gz index 37df405a..c2b09dd3 100644 Binary files a/man/freedombone-rmemail.1.gz and b/man/freedombone-rmemail.1.gz differ diff --git a/man/freedombone-rmlist.1.gz b/man/freedombone-rmlist.1.gz index 67099321..8190ec4c 100644 Binary files a/man/freedombone-rmlist.1.gz and b/man/freedombone-rmlist.1.gz differ diff --git a/man/freedombone-rmsipuser.1.gz b/man/freedombone-rmsipuser.1.gz index 98508e9a..18f8bd89 100644 Binary files a/man/freedombone-rmsipuser.1.gz and b/man/freedombone-rmsipuser.1.gz differ diff --git a/man/freedombone-rmuser.1.gz b/man/freedombone-rmuser.1.gz index 84d6d92d..c9a1a252 100644 Binary files a/man/freedombone-rmuser.1.gz and b/man/freedombone-rmuser.1.gz differ diff --git a/man/freedombone-rmxmpp.1.gz b/man/freedombone-rmxmpp.1.gz index 3a0c600a..c0839470 100644 Binary files a/man/freedombone-rmxmpp.1.gz and b/man/freedombone-rmxmpp.1.gz differ diff --git a/man/freedombone-sec.1.gz b/man/freedombone-sec.1.gz index 2a3977ea..4399ee90 100644 Binary files a/man/freedombone-sec.1.gz and b/man/freedombone-sec.1.gz differ diff --git a/man/freedombone-splitkey.1.gz b/man/freedombone-splitkey.1.gz index 11128e34..ab232028 100644 Binary files a/man/freedombone-splitkey.1.gz and b/man/freedombone-splitkey.1.gz differ diff --git a/man/freedombone-unignore.1.gz b/man/freedombone-unignore.1.gz index 2a668e50..48078e5b 100644 Binary files a/man/freedombone-unignore.1.gz and b/man/freedombone-unignore.1.gz differ diff --git a/man/freedombone-xmpp-pass.1.gz b/man/freedombone-xmpp-pass.1.gz index 4e51da09..8f2310e4 100644 Binary files a/man/freedombone-xmpp-pass.1.gz and b/man/freedombone-xmpp-pass.1.gz differ diff --git a/man/freedombone.1.gz b/man/freedombone.1.gz index c4617e72..3a9d5782 100644 Binary files a/man/freedombone.1.gz and b/man/freedombone.1.gz differ diff --git a/src/freedombone-prep b/src/freedombone-prep deleted file mode 100755 index 002121c3..00000000 --- a/src/freedombone-prep +++ /dev/null @@ -1,380 +0,0 @@ -#!/bin/bash -# -# .---. . . -# | | | -# |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-. -# | | (.-' (.-' ( | ( )| | | | )( )| | (.-' -# ' ' --' --' -' - -' ' ' -' -' -' ' - --' -# -# Freedom in the Cloud -# -# This script installs the Debian image to the microSD card, and should -# be run on your laptop/desktop with the microSD card plugged in. - -# License -# ======= -# -# Copyright (C) 2014-2015 Bob Mottram -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# The number of arguments -NO_OF_ARGS=$# - -PROJECT_NAME='freedombone' - -export TEXTDOMAIN=${PROJECT_NAME}-prep -export TEXTDOMAINDIR="/usr/share/locale" - -# Version number of this script -VERSION="1.01" - -# typically /dev/sdb or /dev/sdc, depending upon how -# many drives there are on your system -MICROSD_DRIVE= - -# IP address of the router (gateway) -ROUTER_IP_ADDRESS="192.168.1.254" - -# The fixed IP address of the Beaglebone Black on your local network -BOX_IP_ADDRESS="192.168.1.55" - -# DNS -NAMESERVER1='213.73.91.35' -NAMESERVER2='85.214.20.141' - -MICROSD_MOUNT_POINT="/media/$USER" - -DEBIAN_IMAGE_FILENAME= -DEBIAN_FILE_NAME="bone-debian-8.1-console-armhf-2015-07-12-2gb.img" - -# Downloads for the Debian installer -DOWNLOAD_LINK1="https://rcn-ee.com/rootfs/bb.org/testing/2015-07-12/console/$DEBIAN_FILE_NAME.xz" - -ROOTFS='rootfs' -ROOTFS_SUBDIR='' - -PARTITION_NUMBER=1 - -CURR_DIR=$(pwd) - -function show_help { - echo '' - echo $'freedombone-prep -i [image filename] -d [microSD device] --ip [BBB LAN IP address] --iprouter [Router LAN IP address] --mount [mount directory]' - echo '' - echo $'See the manpage for more details' - echo '' -} - -function configure_networking { - rootdir=$1 - temp_interfaces=/tmp/freedombone_interfaces - echo "# This file describes the network interfaces available on your system -# and how to activate them. For more information, see interfaces(5). - -# The loopback network interface -auto lo -iface lo inet loopback - -# The primary network interface -auto eth0 -iface eth0 inet static - address $BOX_IP_ADDRESS - netmask 255.255.255.0 - gateway $ROUTER_IP_ADDRESS - dns-nameservers $NAMESERVER1 $NAMESERVER2 -# Example to keep MAC address between reboots -#hwaddress ether B5:A2:BE:3F:1A:FE - -# The secondary network interface -#auto eth1 -#iface eth1 inet dhcp - -# WiFi Example -#auto wlan0 -#iface wlan0 inet dhcp -# wpa-ssid \"essid\" -# wpa-psk \"password\" - -# Ethernet/RNDIS gadget (g_ether) -# ... or on host side, usbnet and random hwaddr -# Note on some boards, usb0 is automaticly setup with an init script -#iface usb0 inet static -# address 192.168.7.2 -# netmask 255.255.255.0 -# network 192.168.7.0 -# gateway 192.168.7.1" > $temp_interfaces - - hexarray=( 1 2 3 4 5 6 7 8 9 0 a b c d e f ) - a=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]} - b=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]} - c=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]} - d=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]} - e=${hexarray[$RANDOM%16]}${hexarray[$RANDOM%16]} - sed -i "s|#hwaddress ether.*|hwaddress ether de:$a:$b:$c:$d:$e|g" \ - $temp_interfaces - - $SUDO cp $temp_interfaces $rootdir/etc/network/interfaces - rm $temp_interfaces - - $SUDO sed -i "s/nameserver.*/nameserver $NAMESERVER1/g" $rootdir/etc/resolv.conf - $SUDO sed -i "/nameserver $NAMESERVER1/a\nameserver $NAMESERVER2" $rootdir/etc/resolv.conf -} - -# if no arguments are given -if [[ $NO_OF_ARGS == 0 ]]; then - show_help - exit 0 -fi - -if [ -d /media ]; then - # different directories for Debian - if [ -d /media/usb1 ]; then - MICROSD_MOUNT_POINT=/media - ROOTFS=usb1 - fi - if [ -d /media/usb1/@ ]; then - MICROSD_MOUNT_POINT=/media - ROOTFS=usb1 - ROOTFS_SUBDIR='/@' - fi - if [ -d /media/usb0 ]; then - MICROSD_MOUNT_POINT=/media - fi -fi -if [ ! -d $MICROSD_MOUNT_POINT ]; then - echo $"The mount directory $MICROSD_MOUNT_POINT does not exist." - echo $'Use the --mount option to specify where the microSD gets mounted to.' - exit 67563 -fi - -echo "MICROSD_MOUNT_POINT=$MICROSD_MOUNT_POINT" - -while [[ $# > 1 ]] -do -key="$1" - -case $key in - -h|--help) - show_help - ;; - # Drive path for the microSD - -d|--drive) - shift - MICROSD_DRIVE="$1" - ;; - # debian disk image created with freedombone-image - -i|--image) - shift - DEBIAN_IMAGE_FILENAME="$1" - ROOTFS_SUBDIR='/@' - ;; - # BBB static IP address on the LAN - --ip) - shift - BOX_IP_ADDRESS="$1" - ;; - # Router IP address on the LAN - --iprouter) - shift - ROUTER_IP_ADDRESS="$1" - ;; - # mount point - --mount) - shift - MICROSD_MOUNT_POINT="$1" - ;; - # nameserver 1 - --ns1) - shift - NAMESERVER1="$1" - ;; - # nameserver 2 - --ns2) - shift - NAMESERVER2="$1" - ;; - *) - # unknown option - ;; -esac -shift -done - - -if [ ! $MICROSD_DRIVE ]; then - echo $'You need to specify a drive for the connected microSD.' - echo $'This can most easily be found by removing the microSD, then' - echo $'running:' - echo '' - echo ' ls /dev/sd*' - echo '' - echo 'or' - echo '' - echo ' ls /dev/mmcblk*' - echo '' - echo $'Then plugging the microSD back in and entering the same command again' - exit 1 -fi - -if [ ! -b ${MICROSD_DRIVE}${PARTITION_NUMBER} ]; then - if [ -b ${MICROSD_DRIVE}p${PARTITION_NUMBER} ]; then - PARTITION_NUMBER=p${PARTITION_NUMBER} - else - echo $"The microSD drive could not be found at ${MICROSD_DRIVE}1" - exit 2 - fi -fi - -SUDO= -if [ -f /usr/bin/sudo ]; then - SUDO='sudo' -fi -$SUDO apt-get install p7zip wget - -if [ ! -d ~/freedombone ]; then - mkdir ~/freedombone -fi -cd ~/freedombone - -# extract the image -if [ $DEBIAN_IMAGE_FILENAME ]; then - # debian image filename specified as an option - if [[ $DEBIAN_IMAGE_FILENAME == *".bz2" ]]; then - tar -xjvf $DEBIAN_IMAGE_FILENAME - pattern="*.img" - files=( $pattern ) - DEBIAN_IMAGE_FILENAME=${files[0]} - fi - if [[ $DEBIAN_IMAGE_FILENAME != *".img" ]]; then - echo $'Debian image (.img) file expected' - exit 62394 - fi - DEBIAN_FILE_NAME=$DEBIAN_IMAGE_FILENAME - if [ ! -f ~/freedombone/$DEBIAN_FILE_NAME ]; then - cd $CURR_DIR - cp $DEBIAN_FILE_NAME ~/freedombone/$DEBIAN_FILE_NAME - cd ~/freedombone - fi -else - # default debian image downloaded from elsewhere - if [ ! -f ~/freedombone/$DEBIAN_FILE_NAME.xz ]; then - if [ ! -f ~/freedombone/$DEBIAN_FILE_NAME ]; then - wget $DOWNLOAD_LINK1 - fi - fi - xz -d $DEBIAN_FILE_NAME.xz -fi - -if [ ! -f ~/freedombone/$DEBIAN_FILE_NAME ]; then - echo $"Couldn't extract image $DEBIAN_FILE_NAME" - exit 4 -fi - -cd ~/freedombone -echo $'Flashing image. This may take a while.' -#$SUDO dd if=$DEBIAN_FILE_NAME of=$MICROSD_DRIVE -sync - -sleep 5 -if [ -d $MICROSD_MOUNT_POINT/$ROOTFS ]; then - umount $MICROSD_MOUNT_POINT/$ROOTFS - $SUDO rm $MICROSD_MOUNT_POINT/$ROOTFS -fi -$SUDO mkdir -p $MICROSD_MOUNT_POINT/$ROOTFS -$SUDO mount ${MICROSD_DRIVE}${PARTITION_NUMBER} $MICROSD_MOUNT_POINT/$ROOTFS -sync - -if [ ! -b ${MICROSD_DRIVE}${PARTITION_NUMBER} ]; then - echo '' - echo $"The microSD drive could not be found at ${MICROSD_DRIVE}${PARTITION_NUMBER}" - read -p $"Wait for the drive to mount then press any key... " -n1 -s - if [ ! -b ${MICROSD_DRIVE}${PARTITION_NUMBER} ]; then - echo $"microSD drive not found at ${MICROSD_DRIVE}${PARTITION_NUMBER}" - exit 5 - fi -fi - -if [ ! -d $MICROSD_MOUNT_POINT/$ROOTFS ]; then - echo '' - echo $"The rootfs partition $MICROSD_MOUNT_POINT/$ROOTFS was not found." - ls $MICROSD_MOUNT_POINT - exit 65688 -fi - -if [ ! -d $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR/home ]; then - echo '' - echo $"The rootfs partition was not written correctly." - ls $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR - exit 65688 -fi - -configure_networking $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR - -# copy the commands to the card -$SUDO cp -f $(which freedombone)* $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR/usr/local/bin/ -$SUDO cp -f $(which zeronetavahi)* $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR/usr/local/bin/ -$SUDO cp -f $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR/usr/local/bin/freedombone-mesh $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR/usr/local/bin/mesh -$SUDO cp -f $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR/usr/local/bin/freedombone-meshweb $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR/usr/local/bin/meshweb -if [ ! -f $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR/usr/local/bin/freedombone ]; then - echo $'There was a problem with writing freedombone commands to the SD card' - exit 8736 -fi - -# remove automatic motd creator if it exists -if [ -f $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR/etc/init.d/motd ]; then - $SUDO rm -f $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR/etc/init.d/motd -fi - -# change the motd to show further install instructions -echo '' >> /tmp/freedombone_motd -echo $'Create a user for the system with:' >> /tmp/freedombone_motd -echo '' >> /tmp/freedombone_motd -echo ' adduser [username]' >> /tmp/freedombone_motd -echo '' >> /tmp/freedombone_motd -echo $'Enter the command "exit" a couple of times to get back to your main system' >> /tmp/freedombone_motd -echo $'then log back in as the user you just created with:' >> /tmp/freedombone_motd -echo '' >> /tmp/freedombone_motd -echo " ssh [username]@$BOX_IP_ADDRESS" >> /tmp/freedombone_motd -echo '' >> /tmp/freedombone_motd -echo $'and use the "su" command to become the root user again.' >> /tmp/freedombone_motd -echo '' >> /tmp/freedombone_motd -echo $'Finally you can use the freedombone command to install a server configuration:' >> /tmp/freedombone_motd -echo '' >> /tmp/freedombone_motd -echo ' apt-get update' >> /tmp/freedombone_motd -echo ' apt-get -y install git dialog build-essential' >> /tmp/freedombone_motd -echo ' freedombone menuconfig' >> /tmp/freedombone_motd - -$SUDO cp -f /tmp/freedombone_motd $MICROSD_MOUNT_POINT/$ROOTFS$ROOTFS_SUBDIR/etc/motd - -clear -echo $'*** Initial microSD card setup is complete ***' -echo '' -echo $'To avoid running out of disk space you may first wish to resize the' -echo $'partition to the size of your microSD card, using something like gparted.' -echo '' -echo $'The microSD card can now be removed and inserted into the Beaglebone Black.' -echo $'Once the Beaglebone has booted then you can log in with:' -echo '' -echo " ssh root@$BOX_IP_ADDRESS" -echo '' -echo $'The root password should be changed with the command "passwd".' -cat /tmp/freedombone_motd -rm /tmp/freedombone_motd -$SUDO umount $MICROSD_MOUNT_POINT/$ROOTFS -sync -if [ -d $MICROSD_MOUNT_POINT/$ROOTFS ]; then - $SUDO rm -rf $MICROSD_MOUNT_POINT/$ROOTFS -fi -exit 0