Changeset 583d755 in freewrt for package/quagga/files/quagga.init
- Timestamp:
- Jul 12, 2006, 12:40:18 AM (19 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- 4486a95
- Parents:
- 115d022
- File:
-
- 1 edited
-
package/quagga/files/quagga.init (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
package/quagga/files/quagga.init
r115d022 r583d755 97 97 # check command 98 98 99 case ${COMMAND} 100 in 101 start|stop|restart) 102 ;; 103 watchrestart) 104 if [ -n "$ARG_DAEMONS" ] 105 then 106 echo "${ME}: watchrestart mode is only for use by watchquagga" 107 exit 2 108 fi 109 ;; 110 *) 111 usage 112 ;; 99 case ${COMMAND} in 100 autostart|start|stop|restart) 101 ;; 102 watchrestart) 103 if [ -n "$ARG_DAEMONS" ] 104 then 105 echo "${ME}: watchrestart mode is only for use by watchquagga" 106 exit 2 107 fi 108 ;; 109 *) 110 usage 111 ;; 113 112 esac 114 113 115 114 # select daemons to start 116 115 117 case ${COMMAND} 118 in 119 start|restart|watchrestart) 120 START_DAEMONS= 121 for d in ${DAEMONS_STARTSEQ} 122 do 123 [ -x "${BINDIR}/${d}" -a -f "${CONFDIR}/${d}.conf" ] \ 124 && START_DAEMONS="${START_DAEMONS}${d} " 125 done 126 WATCHQUAGGA_DAEMONS=${START_DAEMONS} 127 if is_in watchquagga "${DAEMONS_STARTSEQ}" 128 then 129 START_DAEMONS="${START_DAEMONS} watchquagga" 130 fi 131 if [ -n "${ARG_DAEMONS}" ] 132 then 133 if select_subset "${ARG_DAEMONS}" "${DAEMONS}" 134 then 135 if select_subset "${ARG_DAEMONS}" "${START_DAEMONS}" 136 then 137 START_DAEMONS=${RESULT} 138 else 139 die "these daemons are not startable:${RESULT}." 140 fi 141 else 142 die "unknown daemons:${RESULT}; choose from: ${DAEMONS}." 143 fi 144 fi 145 ;; 116 case ${COMMAND} in 117 autostart|start|restart|watchrestart) 118 START_DAEMONS= 119 for d in ${DAEMONS_STARTSEQ} 120 do 121 [ -x "${BINDIR}/${d}" -a -f "${CONFDIR}/${d}.conf" ] \ 122 && START_DAEMONS="${START_DAEMONS}${d} " 123 done 124 WATCHQUAGGA_DAEMONS=${START_DAEMONS} 125 if is_in watchquagga "${DAEMONS_STARTSEQ}" 126 then 127 START_DAEMONS="${START_DAEMONS} watchquagga" 128 fi 129 if [ -n "${ARG_DAEMONS}" ] 130 then 131 if select_subset "${ARG_DAEMONS}" "${DAEMONS}" 132 then 133 if select_subset "${ARG_DAEMONS}" "${START_DAEMONS}" 134 then 135 START_DAEMONS=${RESULT} 136 else 137 die "these daemons are not startable:${RESULT}." 138 fi 139 else 140 die "unknown daemons:${RESULT}; choose from: ${DAEMONS}." 141 fi 142 fi 143 ;; 146 144 esac 147 145 148 146 # select daemons to stop 149 147 150 case ${COMMAND} 151 in 152 stop|restart|watchrestart) 153 STOP_DAEMONS=${DAEMONS_STOPSEQ} 154 if [ -n "${ARG_DAEMONS}" ] 155 then 156 if select_subset "${ARG_DAEMONS}" "${STOP_DAEMONS}" 157 then 158 STOP_DAEMONS=${RESULT} 159 else 160 die "unknown daemons:${RESULT}; choose from: ${DAEMONS}." 161 fi 162 fi 163 stop_daemons= 164 for d in ${STOP_DAEMONS} 165 do 166 pidfile=${STATEDIR}/${d}.pid 167 if [ -f "${pidfile}" -o -n "$(pidof ${d})" ] 168 then 169 stop_daemons="${stop_daemons}${d} " 170 elif [ -n "${ARG_DAEMONS}" ] 171 then 172 echo "${ME}: found no ${d} process running." 173 fi 174 done 175 STOP_DAEMONS=${stop_daemons} 176 ;; 148 case ${COMMAND} in 149 stop|restart|watchrestart) 150 STOP_DAEMONS=${DAEMONS_STOPSEQ} 151 if [ -n "${ARG_DAEMONS}" ] 152 then 153 if select_subset "${ARG_DAEMONS}" "${STOP_DAEMONS}" 154 then 155 STOP_DAEMONS=${RESULT} 156 else 157 die "unknown daemons:${RESULT}; choose from: ${DAEMONS}." 158 fi 159 fi 160 stop_daemons= 161 for d in ${STOP_DAEMONS} 162 do 163 pidfile=${STATEDIR}/${d}.pid 164 if [ -f "${pidfile}" -o -n "$(pidof ${d})" ] 165 then 166 stop_daemons="${stop_daemons}${d} " 167 elif [ -n "${ARG_DAEMONS}" ] 168 then 169 echo "${ME}: found no ${d} process running." 170 fi 171 done 172 STOP_DAEMONS=${stop_daemons} 173 ;; 177 174 esac 178 175
Note:
See TracChangeset
for help on using the changeset viewer.
