And that's annoying, and could provoke your users to do something bad since the file is now clear in view (i.e. try to delete / mess with it)
Here's a quick and dirty script to check, and then hide the flag. Also an EA to make a smart group to check for the issue.
#!/bin/sh
hiddenflagstatus=stat -r /mach_kernel | awk '{print $15}'
if [ "$hiddenflagstatus" = "0" ]
then
chflags hidden /mach_kernel
else
exit 1
fi
exit 0
#!/bin/sh
hiddenflagstatus=stat -r /mach_kernel | awk '{print $15}'
if [ "$hiddenflagstatus" = "32768" ]
then
echo "<result>Hidden</result>"
else
echo "<result>Not Hidden</result>"
fi
exit 0