cleguevara
04-15-2008, 07:24 PM
I've written a little script for my eee in order to save the changes to my sd-card... (the merging issue mentioned in the BT-HowTo is integrated, too)
#!/bin/bash
#Author: cleguevara
#Version: 0.2
#-------determine on which device the flash-storage is---------
FLASHSTORAGE=""
#(I know the following is VERY inefficient and especially SLOW...)
slocate -u
FLASHSTORAGE=$(slocate BT3 |grep sd |grep live |grep root.lzm |cut -d '/' -f 5)
#to set the flash-storage manually comment the above lines and uncomment the following one after typing in your device
#FLASHSTORAGE=
#--------------------save the changes----------------------
dir2lzm /mnt/live/memory/changes new-changes.lzm
mkdir /tmp/changestmp
lzm2dir /mnt/$FLASHSTORAGE/BT3/modules/changes.lzm /tmp/changestmp
lzm2dir new-changes.lzm /tmp/changestmp
dir2lzm /tmp/changestmp changes.lzm
mv /mnt/$FLASHSTORAGE/BT3/modules/changes.lzm /mnt/$FLASHSTORAGE/BT3/changes.lzm.bak
mv changes.lzm /mnt/$FLASHSTORAGE/BT3/modules/
Don't forget to chmod 755 the script ;)
It would be great if anyone points me to a simpler solution for determining the device name of the usb-stick/sd-card/flash-storage
#!/bin/bash
#Author: cleguevara
#Version: 0.2
#-------determine on which device the flash-storage is---------
FLASHSTORAGE=""
#(I know the following is VERY inefficient and especially SLOW...)
slocate -u
FLASHSTORAGE=$(slocate BT3 |grep sd |grep live |grep root.lzm |cut -d '/' -f 5)
#to set the flash-storage manually comment the above lines and uncomment the following one after typing in your device
#FLASHSTORAGE=
#--------------------save the changes----------------------
dir2lzm /mnt/live/memory/changes new-changes.lzm
mkdir /tmp/changestmp
lzm2dir /mnt/$FLASHSTORAGE/BT3/modules/changes.lzm /tmp/changestmp
lzm2dir new-changes.lzm /tmp/changestmp
dir2lzm /tmp/changestmp changes.lzm
mv /mnt/$FLASHSTORAGE/BT3/modules/changes.lzm /mnt/$FLASHSTORAGE/BT3/changes.lzm.bak
mv changes.lzm /mnt/$FLASHSTORAGE/BT3/modules/
Don't forget to chmod 755 the script ;)
It would be great if anyone points me to a simpler solution for determining the device name of the usb-stick/sd-card/flash-storage