Merge branch 'dev'

* add support of root FS mounted RO
* append txt to the log files
pull/10/head
Raphaël Vinot 2013-08-05 23:52:33 +02:00
commit c61883d1c1
6 changed files with 14 additions and 12 deletions

5
fs/etc/fstab Normal file
View File

@ -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

View File

@ -4,10 +4,12 @@ DEV_DST='/dev/sdb1'
USERNAME='kitten' USERNAME='kitten'
HOME="/home/${USERNAME}" HOME="/home/${USERNAME}"
# Paths used in multiple scripts TMP="/tmp/"
SRC="${HOME}/src"
DST="${HOME}/dst" # Paths used in multiple scripts
SRC="${TMP}/src"
DST="${TMP}/dst"
TEMP="${DST}/temp" TEMP="${DST}/temp"
ZIPTEMP="${DST}/ziptemp" ZIPTEMP="${DST}/ziptemp"
LOGS="${DST}/logs" LOGS="${DST}/logs"

View File

@ -9,7 +9,7 @@ source ./constraint_conv.sh
RECURSIVE_ARCHIVE_MAX=3 RECURSIVE_ARCHIVE_MAX=3
RECURSIVE_ARCHIVE_CURRENT=0 RECURSIVE_ARCHIVE_CURRENT=0
ARCHIVE_BOMB=0 ARCHIVE_BOMB=0
LOGFILE="${LOGS}/processing" LOGFILE="${LOGS}/processing.txt"
# Something went wrong. # Something went wrong.
error_handler(){ error_handler(){

View File

@ -97,13 +97,13 @@ do
echo "${partition} mounted at ${SRC}" echo "${partition} mounted at ${SRC}"
# Print the filenames on the current partition in a logfile # 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 # create a directory on ${DST} named PARTION_$PARTCOUNT
target_dir="${DST}/FROM_PARTITION_${PARTCOUNT}" target_dir="${DST}/FROM_PARTITION_${PARTCOUNT}"
echo "copying to: ${target_dir}" echo "copying to: ${target_dir}"
mkdir -p "${target_dir}" mkdir -p "${target_dir}"
LOGFILE="${LOGS}/processing" LOGFILE="${LOGS}/processing.txt"
echo "==== Starting processing of ${SRC} to ${target_dir}. ====" >> ${LOGFILE} echo "==== Starting processing of ${SRC} to ${target_dir}. ====" >> ${LOGFILE}
main ${target_dir} main ${target_dir}

View File

@ -12,17 +12,11 @@ fi
clean(){ clean(){
echo Done, cleaning. echo Done, cleaning.
#mount -o remount,rw /
${SYNC} ${SYNC}
} }
trap clean EXIT TERM INT 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 su ${USERNAME} -c ./groomer.sh

View File

@ -10,3 +10,4 @@ apt-get autoremove
apt-get install libreoffice p7zip-full libfontforge1 apt-get install libreoffice p7zip-full libfontforge1
dpkg -i libpoppler28*.deb pdf2htmlex*.deb dpkg -i libpoppler28*.deb pdf2htmlex*.deb
chown -R kitten:kitten /home/kitten