05 Dec

UPDATE TO: USB Automount Script for Raspberry Pi

Here an update to USB Automount Script for Raspberry Pi after some tests and some comments. The script now supports multiple partitions and those without labels.

You can download it here mount_manager (438 downloads) or checkout the code below. I also updated the original post.

regex='(/dev/sd[a-z][0-9]): (LABEL=\"([A-Za-z0-9_\-]+)\")?.*UUID=\"([a-zA-Z0-9\-]+)\".*TYPE=\"([a-zA-Z0-9]+)\"'
while IFS= read -r line; do
        if [[ $line =~ $regex ]];then
                name="${BASH_REMATCH[1]}"
                label="${BASH_REMATCH[3]}"
                uuid="${BASH_REMATCH[4]}"
                type="${BASH_REMATCH[5]}"
                if [ -z "${label}" ];then
                        label=${uuid}
                fi
                arr_plugged_in_path+=($name)
                arr_plugged_in_label+=($label)
                arr_plugged_in_type+=($type)
        fi
done < <(blkid)

Thanks to all who wrote me and enjoy!

03 Feb

Hello world!

Welcome to SolvedForHome.com.

 

With this site we started a longterm project for home electronic solutions like we built it.

In a first step we write posts about code and scripts we created. While this stuff might only be applicable to those of you, who have some programming knowledge, we plan on doing more. We are currently building first hardware and software products for home use.

During the creation process we will keep you posted and maxbe start some diskussions on product details.

We are planing on selling those products for a fair price, but (if possible) also release some instructions, so the crafty once of you can built the devices on your own.… read more.