Simple login script in openSuSe

Hi guys,

Ok so I'm basically trying to run a script on loging or after everything else has started up, I've done so much googling my head is spinning I don't understand the which file I have to edit with the details of my script,

In suse there is no etc/profiles folder its daemonised so its /etc/profiles.d and I don't understand if this matters?

I've read and looked in various profile rc and bash_rc type files and I'm so confused about the differences between them, I understand there's interactive and normal shells but I don't get what is actually started in the last runlevel or after log in, (or is it just started when an actual terminal is opened?)

Also I've read about this skeleton file in /etc/init.d that you can use to create a service / daemon but that's far too complicated all I need to do is to run the following shell script when I log in:

#!/bin/bash
vgscan
vgchange -ay
mount /dev/mapper/vg_codename-lv_root /home/whitenight639/fedora

basically I have an encrypted logical volume on with all my music on I just want this to automount and I've played with fstab and cryptab and It will not mount during boot as some of the required kernel modules or programmes arn't started at that time, also It won't automount through dolphin I have to run the above commands everytime I have rebooted. Some of the media on this drive is shared as a samba share and sometimes when I login i forget to run those commands and mount the drive so my shares arnt visible on the network.

please help

Either create a .profile file in your home directory that executes these commands, or create an entry in /etc/rc.d/rc5.d. The file name should start with Snn, where nn is a number between 00 and 99. The scripts in this directory are executed in alphabetical order, so you need to use a high enough number that all dependencies are executed before your new script.