Jul 042012

I recently stuffed up a NPC install, so I had to reinstall from scratch. However I neglected to remove the eHealth instance as a data source before I wiped NPC. When I tried to add eHealth as a data source again, I would get this error –
Unable to add eHealth as data souce - associated to another instance

After some searching, I found this command which fixed it for me.
These commands need to be run on the eHealth Host.
*note* If you’re using windows, type in “bash” before you run the command.
$NH_HOME/bin/sys/nhisql "delete from nh_metadata where subject_area='NPC'"

Jul 012012

I’ve created a script to make mounting image files created by dd easier. It will mount an img file onto a directory via the loopback mechanism supported by linux, so your kernel must have loopback support for this script to work.
It also makes use of the mount, fdisk, and file commands so they must be installed also.
This is just the first version, it will tell you if something is mounted when you run the script on the file, and if it is mounted attempt to unmount it.
The script will also need to be run as root or with sudo as mounting from the command line needs to be done with superuser permissions.

The script can be downloaded here

Run it with the command ./imgmgt.sh

Any feedback, feel free to leave a comment πŸ™‚

Update 1/7/2012 – Just updated this to fix up something I did wrong, so anyone who’s already grabbed this, please get it again from the link above. Thanks !