3
PATH="/bin:/sbin:/usr/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:."
6
if [ "$EUID" != "0" ]; then
7
echo "You must run this script as root..."
13
echo "Checking what needs to be done"
15
# check for parport devices
16
if [ ! -c /dev/parport0 ]; then
17
echo "Creating parport devices"
25
# check for kernel modules
26
if ! lsmod|grep parport > /dev/null; then
27
echo "Loading parport modules"
33
if lsmod|grep lp|grep " 0 " > /dev/null; then
34
echo "Unloading lp module"
39
if ! lsmod|grep ppdev > /dev/null; then
40
echo "Loading ppdev module"
45
if [ $job -eq 1 ]; then
48
echo "Nothing to do, your setup is okay"
51
echo "Please run \"cwdaemon -n\" (as root) for diagnosis"