Modified init script to handle other cache methods

The default init script didn't take into account writethrough / writearound caching methods so it didn't work out of the box. Added some conditionals to handle those cache methods.