At every military post, the ball on top of the flagpole can be unscrewed and there are several items stored in it. Inside are: a round of ammunition, a hammer, a grain of rice, a penny, a razor, rubber gloves and galoshes, and a match. If the military base is about to be overrun by hostile forces, the last soldier must climb the pole, unscrew the ball, eat the grain of rice to gain strength, flash the penny in the sun so that the enemy will be distracted by "something shiny," burn the flag with a match so that it can not be captured, and shoot himself with the bullet after shaving with the razor to leave a clean, dignified corpse. The hammer is there so that if the soldier doesn't have a pistol he can hit the bullet with the hammer to kill himself. The rubber gloves and galoshes are so that if it is raining the soldier can put them on so that he won't be killed prematurely by lightning while up the flag pole.
Behind the Legend
As romantic as the notion might be that a military flagpole contains everything a soon-to-be-defeated soldier needs, it is totally false. There is nothing in the gold ball on top of a military flagpole, and if it could be unscrewed someone would have stolen it by now.
Military flagpoles do, however, have a small cache of supplies buried at their base. These include easy-to-erect barriers, several fully automatic rifles and handguns, thousands of rounds of ammunition, grenades, and a few anti-tank rockets. The idea is that the last few survivors of a raid might be able to hold off attackers Alamo-style until help arrives. Certainly this makes more sense than a grain of rice and a penny.
In addition, U.S. flagpoles are filled with explosives that can be triggered by a hidden switch at the pole's base. These explosives will destroy the flag to prevent its capture and kill or seriously wound anyone within 100 meters, hopefully taking out a big batch of attackers in a final blaze of glory. These explosives exist in all U.S. government-owned flagpoles, including those in public schools.