1#!/bin/sh /etc/rc.common 2# Copyright (C) 2006 OpenWrt.org 3START=80 4 5BIN=avahi-daemon 6DEFAULT=/etc/default/$BIN 7OPTIONS="-D" 8RUN_D=/var/run/$BIN 9 10start() { 11 AVAHI_SERVICES_CONF_DIR=/tmp/avahi/services 12 mkdir -p $AVAHI_SERVICES_CONF_DIR 13 cp -f /usr/config/avahi/services/http.service $AVAHI_SERVICES_CONF_DIR/ 14 15 [ -f $DEFAULT ] && . $DEFAULT 16 mkdir -p $RUN_D 17 #if [ -f /etc/passwd ]; then 18 # /bin/grep '^alumnux:' /etc/passwd > /dev/null 19 # if [ $? -ne 0 ]; then 20 # echo "###### Adding alumnux to /etc/passwd ...." >> /tmp/__debug 21 # echo 'alumnux:x:506:506::/home/alumnux:/bin/bash' >> /etc/passwd 22 # fi 23 #else 24 # echo "###### /etc/passwd not found" >> /tmp/__debug 25 #fi 26 #if [ -f /etc/shadow ]; then 27 # /bin/grep '^alumnux:' /etc/shadow > /dev/null 28 # if [ $? -ne 0 ]; then 29 # echo "###### Adding alumnux to /etc/shadow ...." >> /tmp/__debug 30 # echo 'alumnux:$1$REfEIP0A$kGlfiCJzsx6FKzZ6tk.Qm1:14841:0:99999:7:::' >> /etc/shadow 31 # fi 32 #else 33 # echo "###### /etc/shadow not found" >> /tmp/__debug 34 #fi 35 #if [ -f /etc/group ]; then 36 # /bin/grep '^alumnux:' /etc/group > /dev/null 37 # if [ $? -ne 0 ]; then 38 # echo "###### Adding alumnux to /etc/group ...." >> /tmp/__debug 39 # echo 'alumnux:x:506:' >> /etc/group 40 # fi 41 #else 42 # echo "###### /etc/group not found" >> /tmp/__debug 43 #fi 44 #mkdir -p /home/alumnux 45 #if [ ! -L /home/alumnux/TimeCapsule ]; then 46 # ln -s /tmp/mnt/sda1 /home/alumnux/TimeCapsule > /dev/null 2>&1 47 #fi 48 $BIN -f /etc/avahi/avahi-daemon.conf $OPTIONS 49} 50 51stop() { 52 $BIN -k 53} 54 55reload() { 56 $BIN -r 57} 58 59