I personally wouldn't rely on smelly rugs or similar things. Taking precautionary measures is the way to go.
While most living creatures are attracted by a certain smell, they can also be deterred by certain smells (cat litter/rugs keeps mice away), however it's only a temporary solution with...