It took quite a while to find a solution. I am not sure if this is a proper and convenient way to do that, but it works for me.
The following script will do the automated formatting and mounting stuff:
#!/bin/bash
# search the device name 'ANS9010_22222222' and construct the path to it
DEV='/dev/'$( lsblk -n -o name,MODEL | grep ANS | cut -f 1 -d ' ' )
echo $DEV # this schould give something like /dev/sda
# This is now specific to the device
# set the disc label
parted -s $DEV mklabel msdos
# make the partition
parted -s $DEV unit kB mkpart primary 34 100%
# now we have to work with the 1st partition e.g. /dev/sda1
# so we must generate a $DEVP variable
# finally initialize the filesystem and give it a name
DEVP=$DEV'1'
mkfs.ext3 -L HYPERDRIVE $DEVP
# mount it via a 3 way change of dirs
echo '+++ make-dirs +++'
# make a temporary dir for the hyperdrive and mount it to that
mkdir /tmp_hyp
echo '+++ mount +++'
mount /dev/sda1 /tmp_hyp
# move everything to /tmp_hyp
echo '+++ move +++'
mv -f /tmp/* /tmp_hyp
# unmount, clean and remount as /tmp
echo '+++ umount +++'
umount /tmp_hyp
rmdir /tmp_hyp
echo '+++ remount /tmp +++'
mount -t ext3 -o defaults $DEVP /tmp
# !! very important !! change permissions to tms's defaults
chmod 0777 /tmp
Having that, we must achieve, that this script is executed during boot. Since the method via rc.locale is still tricky, adding a line to '/etc/crontab' solved this:
# m h dom mon dow user command
... ... ... ... ... ... ...
@reboot root /usr/local/etc/auto-format-hyperdrive.sh
The important thing here is the 'root' user and the '@reboot', which tells cron to execute the script as root at each reboot. "TaTahha" and this works fine for me.