Will work but I know a guy who got treed by a hog and had a 30-30. All he could get was a shot at the top of its head, and the 30-30 didn’t penetrate the skull.
I find that hard to believe.
This is pure horse manure... The much more likely scenario is that he was so nervous he missed the hog completely. When hit in the skull by my .308 the pig goes down like a sack of bricks, and afterward, the skull feels crunchy and deformable through the skin. Scrambled brains inside.
I have killed ~5 with the .308, and about 6 more with a knife (6" blade, good handle). The knife kills were not after being shot, they were hogs that the dogs had stopped and I waited until a dog on the other side had the pig's attention and stabbed it in the heart. One of those nicked my thumb with a tusk, but I ate him for launch instead of the other way around.