mirror of https://github.com/CIRCL/Circlean
parent
4e811d9e61
commit
05e687c6c6
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
CHROOT_PATH='/mnt/arm_rPi'
|
||||
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
|
@ -14,11 +17,12 @@ fi
|
|||
tar -cvpzf backup.tar.gz -C fs/ .
|
||||
tar -xzf backup.tar.gz -C ${CHROOT_PATH}/
|
||||
cp deb/led ${CHROOT_PATH}/usr/sbin/led
|
||||
cp -rf midi ${CHROOT_PATH}/opt/
|
||||
|
||||
# needed just once, make sure the size of the partition is correct
|
||||
#losetup -o $((122880 * 512)) /dev/loop0 FINAL_2013-09-10-wheezy-raspbian.img
|
||||
e2fsck -f /dev/loop0
|
||||
resize2fs /dev/loop0
|
||||
#e2fsck -f /dev/loop0
|
||||
#resize2fs /dev/loop0
|
||||
#losetup -d /dev/loop0
|
||||
|
||||
#sudo dd bs=4M if=FINAL_2013-09-10-wheezy-raspbian.img of=/dev/sdd
|
||||
|
@ -27,3 +31,6 @@ resize2fs /dev/loop0
|
|||
# if it is, use fdisk to remove the second partition and recreate it (you will
|
||||
# not lose the data).
|
||||
# See resize_img.md
|
||||
|
||||
|
||||
# It is also a good idea to run raspi-config once and enable the console login (allow debugging)
|
||||
|
|
|
@ -21,6 +21,8 @@ if [ -e /dev/sda ]; then
|
|||
if [ -e /dev/sdb ]; then
|
||||
cd /opt/groomer
|
||||
/usr/sbin/led &
|
||||
# avoid possibe misuse
|
||||
/sbin/ifconfig eth0 down
|
||||
./init.sh
|
||||
/sbin/shutdown -h now
|
||||
fi
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
#set -x
|
||||
|
||||
if [ $# -eq 2 ]; then
|
||||
mount -o noexec,nosuid,nodev "${1}" "${2}"
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
DEV_SRC='/dev/sda'
|
||||
DEV_DST='/dev/sdb1'
|
||||
|
||||
# User allowed to do the following commands without password
|
||||
USERNAME='kitten'
|
||||
HOME="/home/${USERNAME}"
|
||||
MUSIC="/opt/midi/"
|
||||
|
||||
TMP="/tmp/"
|
||||
|
||||
# Paths used in multiple scripts
|
||||
SRC="${TMP}/src"
|
||||
|
||||
DST="${TMP}/dst"
|
||||
TEMP="${DST}/temp"
|
||||
ZIPTEMP="${DST}/ziptemp"
|
||||
|
@ -19,6 +20,7 @@ LOGS="${DST}/logs"
|
|||
SUDO='/usr/bin/sudo'
|
||||
ID=`/usr/bin/id -u`
|
||||
SYNC='/bin/sync'
|
||||
TIMIDITY='/usr/bin/timidity'
|
||||
|
||||
# root commands.
|
||||
# To avoid the risk that an attacker use -o remount on mount and other nasty
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
#set -e
|
||||
set -x
|
||||
set -e
|
||||
#set -x
|
||||
|
||||
source ./constraint.sh
|
||||
source ./constraint_conv.sh
|
||||
|
|
|
@ -17,6 +17,8 @@ clean(){
|
|||
|
||||
trap clean EXIT TERM INT
|
||||
|
||||
./music.sh &
|
||||
|
||||
su ${USERNAME} -c ./groomer.sh
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
#set -x
|
||||
|
||||
source ./constraint.sh
|
||||
|
||||
# Force output on analog
|
||||
amixer cset numid=3 1
|
||||
|
||||
files=(${MUSIC}*)
|
||||
|
||||
while true; do
|
||||
$TIMIDITY ${files[RANDOM % ${#files[@]}]}
|
||||
done
|
|
@ -7,7 +7,7 @@ dpkg-reconfigure locales
|
|||
apt-get update
|
||||
apt-get dist-upgrade
|
||||
apt-get autoremove
|
||||
apt-get install libreoffice p7zip-full libfontforge1
|
||||
apt-get install libreoffice p7zip-full libfontforge1 timidity
|
||||
dpkg -i libpoppler37*.deb pdf2htmlex*.deb
|
||||
|
||||
chown -R kitten:kitten /home/kitten
|
||||
|
|
Loading…
Reference in New Issue