#!/bin/bash
if cat /proc/1/cmdline | grep -q initng
then
    exec /sbin/ngc -e /sbin/shutdown_script,poweroff
else
    exec /sbin/shutdown -h now
fi
