#!/bin/bash # functions . /etc/rc.conf . /etc/rc.d/functions . /etc/rc.d/functions.d/cmdline # configs . /etc/chakra-hwdetect.conf # needed hooks (located in /opt/chakra/hooks) LOAD_HOOKS="hwdetect_1_base hwdetect_2_platform hwdetect_3_quirks hwdetect_4_power hwdetect_5_network hwdetect_6_alsa hwdetect_7_graphics" # load hooks for hook in ${LOAD_HOOKS} do . /opt/chakra/hooks/${hook} done # lets start case "$1" in start) stat_busy "Inspecting hardware" hwdetect_base hwdetect_platform hwdetect_quirks hwdetect_power hwdetect_network stat_done stat_busy "Inspecting graphics hardware" hwdetect_graphics stat_done stat_busy "Setting up audio volume levels" hwdetect_alsa stat_done ;; stop) ;; restart) $0 stop sleep 1 $0 start ;; *) echo "usage: $0 {start|stop|restart}" esac