diff --git a/fs/etc/fstab b/fs/etc/fstab new file mode 100644 index 0000000..f05f0fe --- /dev/null +++ b/fs/etc/fstab @@ -0,0 +1,5 @@ +proc /proc proc defaults 0 0 +/dev/mmcblk0p1 /boot vfat ro,defaults 0 2 +/dev/mmcblk0p2 / ext4 ro,defaults,noatime 0 1 +tmpfs /tmp tmpfs rw,size=64M,noexec,nodev,nosuid,mode=1777 0 0 +# a swapfile is not a swap partition, so no using swapon|off from here on, use dphys-swapfile swap[on|off] for that diff --git a/fs/opt/groomer/constraint.sh b/fs/opt/groomer/constraint.sh index 2506d52..ca2b30c 100644 --- a/fs/opt/groomer/constraint.sh +++ b/fs/opt/groomer/constraint.sh @@ -4,10 +4,12 @@ DEV_DST='/dev/sdb1' USERNAME='kitten' HOME="/home/${USERNAME}" -# Paths used in multiple scripts -SRC="${HOME}/src" +TMP="/tmp/" -DST="${HOME}/dst" +# Paths used in multiple scripts +SRC="${TMP}/src" + +DST="${TMP}/dst" TEMP="${DST}/temp" ZIPTEMP="${DST}/ziptemp" LOGS="${DST}/logs" diff --git a/fs/opt/groomer/functions.sh b/fs/opt/groomer/functions.sh index 5ed2ed7..6651e77 100755 --- a/fs/opt/groomer/functions.sh +++ b/fs/opt/groomer/functions.sh @@ -9,7 +9,7 @@ source ./constraint_conv.sh RECURSIVE_ARCHIVE_MAX=3 RECURSIVE_ARCHIVE_CURRENT=0 ARCHIVE_BOMB=0 -LOGFILE="${LOGS}/processing" +LOGFILE="${LOGS}/processing.txt" # Something went wrong. error_handler(){ diff --git a/fs/opt/groomer/groomer.sh b/fs/opt/groomer/groomer.sh index 99af3e5..74b09d8 100755 --- a/fs/opt/groomer/groomer.sh +++ b/fs/opt/groomer/groomer.sh @@ -97,13 +97,13 @@ do echo "${partition} mounted at ${SRC}" # Print the filenames on the current partition in a logfile - find "${SRC}" -fls "${LOGS}/Content_partition_${PARTCOUNT}" + find "${SRC}" -fls "${LOGS}/Content_partition_${PARTCOUNT}.txt" # create a directory on ${DST} named PARTION_$PARTCOUNT target_dir="${DST}/FROM_PARTITION_${PARTCOUNT}" echo "copying to: ${target_dir}" mkdir -p "${target_dir}" - LOGFILE="${LOGS}/processing" + LOGFILE="${LOGS}/processing.txt" echo "==== Starting processing of ${SRC} to ${target_dir}. ====" >> ${LOGFILE} main ${target_dir} diff --git a/fs/opt/groomer/init.sh b/fs/opt/groomer/init.sh index a03fdfb..1627deb 100755 --- a/fs/opt/groomer/init.sh +++ b/fs/opt/groomer/init.sh @@ -12,17 +12,11 @@ fi clean(){ echo Done, cleaning. - #mount -o remount,rw / ${SYNC} } trap clean EXIT TERM INT -# Remount the root filesystem in RO mode -#mount -o remount,ro / - -chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/ - su ${USERNAME} -c ./groomer.sh diff --git a/prepare_rPI.sh b/prepare_rPI.sh index 03006a8..3f04d04 100755 --- a/prepare_rPI.sh +++ b/prepare_rPI.sh @@ -10,3 +10,4 @@ apt-get autoremove apt-get install libreoffice p7zip-full libfontforge1 dpkg -i libpoppler28*.deb pdf2htmlex*.deb +chown -R kitten:kitten /home/kitten