We want to add some important test before init 6 will take effect ( on redhat )
As the following
We add the function ( init ) in /root/.bashrc
init () {
    /home/sanity.sh
    [[ $? –eq 0 ]] && echo "reboot will performed" || 
         echo "reboot will not performed because sanity.sh exit with error" && exit 1
    Sleep 1
    init $@    
}
But from some unclear reason init 6 not performed
What is wrong in my function?
Goal – before init 6 command , we want to get status from /home/sanity.sh Script
If status is 0 then init 6 will done , if not then init 6 will not allowed !