Merge lp:~ssalley/ubuntu/oneiric/likewise-open/likewise-open-fix-845477 into lp:ubuntu/oneiric/likewise-open

Proposed by Scott Salley
Status: Merged
Merge reported by: James Page
Merged at revision: not available
Proposed branch: lp:~ssalley/ubuntu/oneiric/likewise-open/likewise-open-fix-845477
Merge into: lp:ubuntu/oneiric/likewise-open
Diff against target: 2230 lines (+2210/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/config-fixes-for-verbose-make.patch (+2202/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~ssalley/ubuntu/oneiric/likewise-open/likewise-open-fix-845477
Reviewer Review Type Date Requested Status
Clint Byrum (community) Needs Information
Ubuntu branches Pending
Review via email: mp+75067@code.launchpad.net

Description of the change

likewise-open recently dropped the use of autotools for Likewise developed components and moved to makekit. In the previous build system, someone used sed for processing some files during the build instead of using standard AC_CONFIG_FILES. This deficiency was preserved with the move to makekit. However, makekit makes much greater use of make and adding V=1 (verbose) to the make command line introduced a bug.

I've modified the build process to use mk_output_file (roughly like AC_CONFIG_FILES) to correct this. Removing V=1 from the make command line would also have worked, but that didn't feel like the right fix.

To post a comment you must log in.
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Scott, this looks pretty big as a patch, I'd like to be able to track its progress into upstream before adding it to Ubuntu. Can you add a 'Bug:' header to the patch with a link to the upstream submission?

Also its not clear, does the package build incorrectly, or not at all, without this patch?

review: Needs Information
Revision history for this message
Scott Salley (ssalley) wrote :

Regarding the size of the patch, most of it is because several files were renamed from whatever.sh to whatever.sh.in.

Without this patch, the package builds but does not function properly after install. Note that just removing 'V=1' from make would 'fix' things.

Regarding the 'Bug:', the upstream bug database is not exposed. I have checked the change in to our main branch, but I don't expect it to propagate to the public site very soon. But I will try to expedite that.

Are there other things I could do to help get this patch reviewed?

Note that we are in the process of shutting down our operations. Half of 'Likewise' was acquired by BeyondTrust in July and we are now moving offices. A lot of our servers are going offline and I will be offline in a few days. It is estimated to be a few weeks before we will be functional again.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-09-06 22:10:33 +0000
3+++ debian/changelog 2011-09-12 20:31:24 +0000
4@@ -1,3 +1,10 @@
5+likewise-open (6.1.0.406-0ubuntu4) oneiric; urgency=low
6+
7+ * Added patch debian/patches/config-fixes-for-verbose-make.patch. LP: #845477.
8+
9+ -- Scott Salley <ssalley@likewise.com> Fri, 09 Sep 2011 11:56:11 -0800
10+
11+
12 likewise-open (6.1.0.406-0ubuntu3) oneiric; urgency=low
13
14 * Re-enable and update dropped patch
15
16=== added file 'debian/patches/config-fixes-for-verbose-make.patch'
17--- debian/patches/config-fixes-for-verbose-make.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/config-fixes-for-verbose-make.patch 2011-09-12 20:31:24 +0000
19@@ -0,0 +1,2202 @@
20+Author: Scott Salley <ssalley@beyondtrust.com>
21+Description: Modify the way init scripts are fixed up because 'make V=1' results
22+in corrupted files.
23+Forwarded: yes
24+Last-Update: 2011-09-12
25+
26+diff -Nurb '--exclude=.bzr' likewise-open/git-build/config/init-base.sh likewise-open.new/git-build/config/init-base.sh
27+--- likewise-open/git-build/config/init-base.sh 2011-09-09 11:04:54.000000000 -0700
28++++ likewise-open.new/git-build/config/init-base.sh 1969-12-31 16:00:00.000000000 -0800
29+@@ -1,679 +0,0 @@
30+-#!/bin/sh
31+-
32+-# Generic cross-platform init script logic
33+-# Copyright (c) Likewise Software, Inc.
34+-# All rights reserved.
35+-#
36+-# Authors: Jerry Carter (gcarter@likewisesoftware.com)
37+-# Kyle Stemen (kstemen@likewisesoftware.com)
38+-# Brian Koropoff (bkoropoff@likewisesoftware.com)
39+-
40+-# Implict arguments to this script when sourced:
41+-#
42+-# PROG_DESC - English description of program/service
43+-# PROG_BIN - path to the program binary
44+-# PROG_ARGS - additional arguments to pass to program on startup
45+-# PROG_ERR - file where error diagnostics are logged
46+-# PIDFILE - file where pid is stored (or empty/unset if a pid file is not created)
47+-# SCRIPTNAME - the name of the init script
48+-
49+-## Have to set the path for HP-UX boot process
50+-PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
51+-export PATH
52+-
53+-alias_replacement()
54+-{
55+- # Simulates the alias builtin function. It does this by creating a function
56+- # with the name of what should be aliased. So if it was run like this:
57+- # alias_replacement myecho='echo my'
58+- # Then the alias would be emulated like this:
59+- # myecho()
60+- # {
61+- # echo my "$@"
62+- # }
63+- if [ "$#" -ne 1 ]; then
64+- echo "alias takes 1 argument"
65+- return 1
66+- fi
67+- # This function is passed something like abc=xyz . The name variable gets
68+- # set to abc, and value gets set to xyz .
69+- name="`expr "$1" : '^\(.*\)='`"
70+- value="`expr "$1" : '.*=\(.*\)$'`"
71+- eval "$name() { $value \"\$@\"; }"
72+-}
73+-
74+-alias aliastest=echo
75+-type aliastest 1>/dev/null 2>/dev/null
76+-alias_works=$?
77+-
78+-_test_alias() { false; }
79+-alias _test_alias="true"
80+-case a in a) _test_alias; alias_case_works=$?;; esac
81+-eval '_test_alias >/dev/null 2>&1'
82+-alias_eval_works=$?
83+-
84+-if [ $alias_works -ne 0 -o $alias_case_works -ne 0 ]
85+-then
86+- ( alias() { true; } ) >/dev/null 2>&1
87+- can_overwrite_builtins=$?
88+- unset alias >/dev/null 2>&1
89+-
90+- if [ $alias_eval_works -eq 0 -a $can_overwrite_builtins -ne 0 ]; then
91+- # This is HP-UX. The alias command only takes effect when the file
92+- # is read. Furthermore, HP-UX won't let us redefine shell
93+- # builtins as system functions. So we'll have to alias
94+- # whatever shell builtins we need to now, and reread the file. The
95+- # alias_replacement function can realias the shell builtins after
96+- # they are renamed.
97+- echo_rename()
98+- {
99+- echo "$@"
100+- }
101+- alias echo=echo_rename
102+- alias alias=alias_replacement
103+- # It would cause problems if these aliases are left around for
104+- # when this script is resourced.
105+- unalias _test_alias
106+- unalias aliastest
107+- # Resource this script
108+- . EXECDIR/init-base.sh
109+- exit $?
110+- fi
111+-
112+- # This platform doesn't have a working alias (at all). It needs to be
113+- # replaced. This is primarily for Solaris and FreeBSD.
114+- alias()
115+- {
116+- alias_replacement "$@"
117+- }
118+-fi
119+-
120+-
121+-##
122+-## Determine what platform we are on
123+-##
124+-PLATFORM=""
125+-if [ -f /etc/init.d/functions ]; then
126+- . /etc/init.d/functions
127+- PLATFORM="REDHAT"
128+-elif [ -f /etc/rc.status ]; then
129+- . /etc/rc.status
130+- PLATFORM="SUSE"
131+-elif [ -f /etc/debian_version ]; then
132+- . /lib/lsb/init-functions
133+- PLATFORM="DEBIAN"
134+-elif [ "`uname -s`" = 'AIX' ]; then
135+- PLATFORM="AIX"
136+-elif [ "`uname -s`" = 'HP-UX' ]; then
137+- PLATFORM="HP-UX"
138+-elif [ "`uname -s`" = 'SunOS' ]; then
139+- PLATFORM="SOLARIS"
140+-elif [ "`uname -s`" = 'VMkernel' ]; then
141+- PLATFORM="ESXI"
142+-elif [ "`uname`" = "FreeBSD" -o "`uname`" = "Isilon OneFS" ]; then
143+- PLATFORM="FREEBSD"
144+- extra_commands="reload"
145+- reload_cmd=daemon_reload
146+- status_cmd=daemon_status
147+- start_cmd=daemon_start
148+- stop_cmd=daemon_stop
149+-else
150+- PLATFORM="UNKNOWN"
151+-fi
152+-
153+-if [ -f /etc/rc.subr ]; then
154+- . /etc/rc.subr
155+-fi
156+-
157+-if [ $PLATFORM = "HP-UX" -o $PLATFORM = "SOLARIS" -o $PLATFORM = "FREEBSD" ]; then
158+- LOCKFILE="/var/run/${SCRIPTNAME}.lock"
159+-else
160+- LOCKFILE="/var/lock/subsys/${SCRIPTNAME}"
161+-fi
162+-
163+-type printf 1>/dev/null 2>/dev/null
164+-if [ $? -ne 0 ]; then
165+- # Usually printf is a shell built in, but on HPUX it is a program located
166+- # at /bin/printf. During system startup and shutdown the path is only
167+- # /sbin, so we need to manually find printf
168+- if [ -x /bin/printf ]; then
169+- alias printf=/bin/printf
170+- else
171+- echo "WARNING: unable to find printf program"
172+- fi
173+-fi
174+-
175+-# echo_replacement emulates echo for all platforms using printf. printf is a
176+-# shell builtin that exists on all platforms.
177+-echo_replacement()
178+-{
179+- if [ "$1" = "-n" ]; then
180+- shift;
181+- printf %s "$*"
182+- else
183+- printf %s\\n "$*"
184+- fi
185+-}
186+-
187+-# 'echo -n' works with bash, but not with sh on Solaris, HPUX, and AIX.
188+-if [ "`echo -n`" = "-n" ]; then
189+- alias echo=echo_replacement
190+-fi
191+-
192+-seq_replacement()
193+-{
194+- FIRST=1
195+- INCREMENT=1
196+- case "$#" in
197+- 0)
198+- echo too few arguments
199+- return 1
200+- ;;
201+- 1)
202+- LAST="$1"
203+- ;;
204+- 2)
205+- FIRST="$1"
206+- LAST="$2"
207+- ;;
208+- 3)
209+- FIRST="$1"
210+- INCREMENT="$2"
211+- LAST="$3"
212+- ;;
213+- *)
214+- echo too many arguments
215+- return 1
216+- ;;
217+- esac
218+- i="$FIRST"
219+- while [ "$i" -le "$LAST" ]; do
220+- echo "$i"
221+- i="`expr "$i" + "$INCREMENT"`"
222+- done
223+- return 0;
224+-}
225+-
226+-# seq doesn't exist on HPUX or FreeBSD
227+-type seq 2>/dev/null 1>/dev/null
228+-if [ $? -ne 0 ]; then
229+- alias seq=seq_replacement
230+-fi
231+-
232+-##
233+-## small wrapper functions around distro specific calls
234+-##
235+-
236+-status_success() {
237+- case "${PLATFORM}" in
238+- REDHAT)
239+- echo_success
240+- echo
241+- ;;
242+- SUSE)
243+- rc_reset
244+- rc_status -v
245+- ;;
246+- DEBIAN)
247+- ;;
248+- AIX | HP-UX | SOLARIS | FREEBSD | ESXI | UNKNOWN)
249+- echo "...ok"
250+- ;;
251+- esac
252+-}
253+-
254+-status_failed() {
255+- status=$1
256+- case "${PLATFORM}" in
257+- REDHAT)
258+- echo_failure
259+- echo
260+- ;;
261+- SUSE)
262+- rc_failed $status
263+- rc_status -v
264+- ;;
265+- DEBIAN)
266+- ;;
267+- AIX | HP-UX | SOLARIS | ESXI | UNKNOWN)
268+- echo "...failed"
269+- ;;
270+- esac
271+-}
272+-
273+-print_status () {
274+- status=$1
275+-
276+- if [ $status = 0 ]; then
277+- status_success
278+- else
279+- status_failed $status
280+- fi
281+-}
282+-
283+-generic_status()
284+-{
285+- #Uses return codes specified in
286+- # http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
287+- pids="`generic_pid`"
288+- #Take the list of pids and get just the last one
289+- pid=""
290+- for i in $pids; do
291+- pid="$i"
292+- done
293+-
294+- if [ -n "$pid" ]
295+- then
296+- #Is the pid valid?
297+- #Does the program with that pid match our program name?
298+- #HP-UX needs UNIX95 set to support the -o option
299+- if [ "${PLATFORM}" = "ESXI" ]; then
300+- if kill -0 $pid > /dev/null 2>&1 ; then
301+- # pid is valid. have to assume it's the right program
302+- return 0
303+- else
304+- return 1
305+- fi
306+- fi
307+- pid_comm="`UNIX95=1 ps -p "$pid" -o args= 2>/dev/null | awk '{print $1}'`"
308+- if [ "$pid_comm" = "<defunct>" ]; then
309+- #It is a zombie process
310+- return 4
311+- fi
312+- if [ "$pid_comm" = "${PROG_BIN}" ]; then
313+- #If the system keeps cmdline files, check it
314+- if [ -f /proc/${pid}/cmdline ]; then
315+- #We can't check the exe file because we may be looking
316+- #at a version of the program that has been overwritten
317+- grep -q ${PROG_BIN} /proc/${pid}/cmdline && return 0
318+- else
319+- return 0
320+- fi
321+- fi
322+-
323+- #Program is dead, but lock file exists
324+- [ -f "${LOCKFILE}" ] && return 2
325+-
326+- #Program is dead, but pid file exists
327+- return 1
328+- else
329+- return 3
330+- fi
331+-}
332+-
333+-generic_pid()
334+-{
335+- if [ -n "${PIDFILE}" -a -f "${PIDFILE}" ]
336+- then
337+- cat "${PIDFILE}"
338+- else
339+- case "${PLATFORM}" in
340+- FREEBSD)
341+- pgrep -f "^${PROG_BIN}"
342+- ;;
343+- ESXI)
344+- ( ps | grep "^[0-9]* [0-9]* `basename ${PROG_BIN}` *${PROG_BIN}" | awk '{ print $1 };' | head -1 )
345+- ;;
346+- HP-UX)
347+- ( UNIX95= ps -e -o pid= -o args= | grep "^ *[0123456789]* *${PROG_BIN}" | awk '{ print $1 };' )
348+- ;;
349+- *)
350+- ( UNIX95=1; ps -e -o pid= -o args= | grep "^ *[0123456789]* *${PROG_BIN}" | awk '{ print $1 };' )
351+- ;;
352+- esac
353+- fi
354+-}
355+-
356+-check_load_path()
357+-{
358+- libdir=/opt/likewise/lib
359+- if [ -x /opt/likewise/lib64 ]; then
360+- libdir=/opt/likewise/lib64
361+- fi
362+- for name in LD_LIBRARY_PATH LIBPATH SHLIB_PATH; do
363+- eval value=\$$name
364+- if [ -n "$value" ]; then
365+- expr "$value" : "^$libdir:" >/dev/null
366+- if [ $? -ne 0 ]; then
367+- if type logger >/dev/null 2>&1; then
368+- logger -p daemon.error "LD_LIBRARY_PATH, LIBPATH, and SHLIB_PATH must be unset or list $libdir as the first directory. Likewise daemons will automatically unset the variable, but this variable still must be changed for the rest of your system. See the \"Requirements for the Agent\" section of the Likewise manual for more information."
369+- fi
370+- unset $name
371+- export $name
372+- fi
373+- fi
374+- done
375+- if [ -n "$LD_PRELOAD" ]; then
376+- if type logger >/dev/null 2>&1; then
377+- logger -p daemon.error "LD_PRELOAD must be unset. Likewise daemons will automatically unset the variable, but this variable still must be changed for the rest of your system. See the \"Requirements for the Agent\" section of the Likewise manual for more information."
378+- fi
379+- unset LD_PRELOAD
380+- export LD_PRELOAD
381+- fi
382+-}
383+-
384+-daemon_start() {
385+-
386+- if [ -f "${PROG_ERR}" ]; then
387+- /bin/rm -f $PROG_ERR;
388+- fi
389+-
390+- if [ -n "${STARTHOOK}" ]; then
391+- ${STARTHOOK}
392+- fi
393+-
394+- check_load_path
395+-
396+- case "${PLATFORM}" in
397+- REDHAT)
398+- echo -n $"Starting `basename ${PROG_BIN}`: "
399+- daemon ${PROG_BIN} ${PROG_ARGS}
400+- status=$?
401+- ;;
402+- SUSE)
403+- echo -n "Starting $PROG_DESC"
404+- startproc ${PROG_BIN} ${PROG_ARGS}
405+- status=$?
406+- ;;
407+- DEBIAN)
408+- log_daemon_msg "Starting $PROG_DESC: `basename $PROG_BIN`"
409+- start-stop-daemon --start --exec ${PROG_BIN} -- ${PROG_ARGS}
410+- status=$?
411+- log_end_msg $status
412+- ;;
413+- AIX)
414+- echo -n "Starting $PROG_DESC"
415+- if (lssrc -s dhcpcd | grep active >/dev/null); then
416+- # Wait up to 30 seconds for an ip address
417+- for i in `seq 30`; do
418+- ifconfig -a | grep inet | grep -v 127.0.0 | grep -v 0.0.0.0 | grep -v ::1/0 >/dev/null && break
419+- sleep 1
420+- done
421+- fi
422+- ${PROG_BIN} ${PROG_ARGS}
423+- status=$?
424+- if [ $status -eq 0 ]; then
425+- status=1
426+- for i in `seq 5`; do
427+- #Did the program start?
428+- generic_status
429+- status=$?
430+- [ $status -eq 0 ] && break
431+- sleep 1
432+- done
433+- fi
434+- ;;
435+- HP-UX | SOLARIS | FREEBSD | ESXI)
436+- echo -n "Starting $PROG_DESC"
437+- if type svcadm >/dev/null 2>&1 ; then
438+- # Use the solaris service manager
439+-
440+- # This will start the program again if it was in maintenance
441+- # mode.
442+- svcadm clear "$SCRIPTNAME" 2>/dev/null
443+- # This will start the program again if it was disabled.
444+- svcadm enable "$SCRIPTNAME"
445+- status=$?
446+- else
447+- ${PROG_BIN} ${PROG_ARGS}
448+- status=$?
449+- fi
450+- if [ $status -eq 0 ]; then
451+- status=1
452+- for i in `seq 5`; do
453+- #Did the program start?
454+- generic_status
455+- status=$?
456+- [ $status -eq 0 ] && break
457+- sleep 1
458+- done
459+- fi
460+- ;;
461+- UNKNOWN)
462+- ${PROG_BIN} ${PROG_ARGS}
463+- status=$?
464+- ;;
465+- esac
466+-
467+- if [ -n "${POSTSTARTHOOK}" ]; then
468+- ${POSTSTARTHOOK}
469+- fi
470+-
471+- [ $status = 0 ] && [ ${PLATFORM} != "DEBIAN" ] && touch ${LOCKFILE}
472+- return $status
473+-}
474+-
475+-daemon_stop() {
476+- case "${PLATFORM}" in
477+- REDHAT)
478+- echo -n $"Stopping `basename ${PROG_BIN}`: "
479+- killproc `basename ${PROG_BIN}`
480+- status=$?
481+- ;;
482+- SUSE)
483+- echo -n "Stopping $PROG_DESC "
484+- killproc -TERM ${PROG_BIN}
485+- status=$?
486+- ;;
487+- DEBIAN)
488+- log_daemon_msg "Stopping $PROG_DESC: `basename $PROG_BIN`"
489+- status=1
490+- #only try to stop the daemon if it is running
491+- if generic_status; then
492+- kill -TERM "`generic_pid`"
493+- # Forget our pidfile since it will now be invalid
494+- # if is still present. This means generic_status
495+- # will fall back on ps to see if the daemon is still
496+- # running. This is important on LinuxThreads-based
497+- # systems where other threads can still be in the process
498+- # of shutting down even when the main thread has exited
499+- PIDFILE=""
500+- #Wait up to 5 seconds for the program to end
501+- for i in `seq 5`; do
502+- #Did the program end?
503+- generic_status
504+- # Make sure the agent is not running and is not a zombie
505+- # process.
506+- [ $? -ne 0 -a $? -ne 4 ] && status=0 && break
507+- # use the following line instead after bug 3634 is fixed
508+- #[ $? -eq 3 -o $? -eq 2 ] && status=0 && break
509+- sleep 1
510+- done
511+- fi
512+- log_end_msg $status
513+- ;;
514+- AIX | HP-UX | SOLARIS | FREEBSD | ESXI)
515+- echo -n "Stopping $PROG_DESC"
516+- status=1
517+- #only try to stop the daemon if it is running
518+- if generic_status; then
519+- pid="`generic_pid`"
520+- kill -TERM $pid
521+-
522+- #Wait up to 5 seconds for the program to end
523+- for i in `seq 5`; do
524+- #Did the program end?
525+- generic_status
526+- # Make sure the agent is not running and is not a zombie
527+- # process.
528+- [ $? -ne 0 -a $? -ne 4 ] && status=0 && break
529+- # use the following line instead after bug 3634 is fixed
530+- #[ $? -eq 3 -o $? -eq 2 ] && status=0 && break
531+- sleep 1
532+- done
533+- fi
534+- ;;
535+- UNKNOWN)
536+- killall -TERM `basename ${PROG_BIN}`
537+- status=$?
538+- ;;
539+- esac
540+-
541+- [ $status = 0 ] && /bin/rm -f ${LOCKFILE}
542+- return $status
543+-}
544+-
545+-daemon_reload()
546+-{
547+- case "${PLATFORM}" in
548+- REDHAT | SUSE | FREEBSD | ESXI)
549+- echo -n $"Reloading ${PROG_DESC} configuration"
550+- killall -HUP "`basename ${PROG_BIN}`"
551+- status=$?
552+- ;;
553+- DEBIAN)
554+- log_daemon_msg "Reloading $PROG_DESC configuration"
555+- killall -HUP "`basename ${PROG_BIN}`"
556+- status=$?
557+- log_end_msg $status
558+- ;;
559+- AIX | HP-UX | SOLARIS | UNKNOWN)
560+- echo -n "Stopping $PROG_DESC"
561+- generic_killall -HUP
562+- status=$?
563+- ;;
564+- esac
565+-
566+- return $status
567+-}
568+-
569+-daemon_status() {
570+- case "${PLATFORM}" in
571+- REDHAT)
572+- status ${PROG_BIN}
573+- ;;
574+- SUSE)
575+- checkproc ${PROG_BIN}
576+- rc_status -v
577+- ;;
578+- AIX | HP-UX | SOLARIS | DEBIAN | FREEBSD | ESXI)
579+- generic_status
580+- status=$?
581+- case "$status" in
582+- 0)
583+- echo "running";
584+- ;;
585+- 1)
586+- echo "stopped";
587+- #Use the bellow line instead after bug 3634 is fixed
588+- #echo "died leaving pid file";
589+- ;;
590+- 2)
591+- echo "died leaving lock file";
592+- ;;
593+- 3)
594+- echo "stopped";
595+- ;;
596+- esac
597+- return $status
598+- ;;
599+- UNKNOWN)
600+- echo "Not implemented."
601+- ;;
602+- esac
603+-}
604+-
605+-#Sends the signal specified by the first parameter to all instances
606+-#of $PROG_BIN
607+-generic_killall()
608+-{
609+- #This gets the list of all current running instances of PROG_BIN,
610+- #but it can't tell which directory the program was run from. If
611+- #cmdline is available in the proc pseudo-filesystem, we'll verify
612+- #the pids.
613+- unverified_pids=`generic_pid`
614+- pids=
615+- for pid in $unverified_pids; do
616+- #If the system keeps cmdline files, check them
617+- if [ -f /proc/${pid}/cmdline ]; then
618+- #We can't check the exe file because we may be looking
619+- #at a version of the program that has been overwritten
620+- grep -q ${AUTHD_BIN} /proc/${pid}/cmdline && pids="$pids $pid"
621+- else
622+- pids="$pids $pid"
623+- fi
624+- done
625+-
626+- for pid in $pids; do
627+- [ ! -z "`UNIX95=1 ps -p $pid -o pid=`" ] && kill "$1" $pid
628+- done
629+-
630+- #The manpage of killall says it returns 0 if at least one process is
631+- #killed. I can't get it to return anything other than 0. Even if no
632+- #processes die with SIGTERM. We'll just return 0 here too
633+- return 0
634+-}
635+-
636+-####################################################################
637+-## Main init script code
638+-##
639+-
640+-if type run_rc_command >/dev/null 2>&1; then
641+- # Looks like this is a FreeBSD based system. We should use their arg
642+- # parsing instead of our own.
643+- name="$SCRIPTNAME"
644+- rcvar="`set_rcvar`"
645+- command="$PROG_BIN"
646+- command_args="$PROG_ARGS"
647+- pidfile="$PIDFILE"
648+- eval "${name}_enable=YES"
649+-
650+- load_rc_config "$name"
651+- [ "$1" = "start" -a -n "${STARTHOOK}" ] && ${STARTHOOK}
652+- check_load_path
653+- run_rc_command "$1" || exit $?
654+- [ "$1" = "start" -a -n "${POSTSTARTHOOK}" ] && ${POSTSTARTHOOK}
655+- exit 0
656+-fi
657+-
658+-case "$1" in
659+- start)
660+- daemon_start
661+- ret=$?
662+- print_status $ret
663+- ;;
664+-
665+- stop)
666+- daemon_stop
667+- ret=$?
668+- print_status $ret
669+- ;;
670+-
671+- # HP-UX calls this
672+- stop_msg)
673+- echo "Stopping $PROG_DESC"
674+- exit 0
675+- ;;
676+-
677+- # HP-UX calls this
678+- start_msg)
679+- echo "Starting $PROG_DESC"
680+- exit 0
681+- ;;
682+-
683+- restart)
684+- daemon_stop
685+- ret=$?
686+- print_status $ret
687+- daemon_start
688+- ret=$?
689+- print_status $ret
690+- ;;
691+-
692+- status)
693+- daemon_status
694+- ;;
695+-
696+- reload)
697+- # Ignore SIGHUP since killall could send it to us as well
698+- trap '' HUP
699+- daemon_reload
700+- ret=$?
701+- print_status $ret
702+- ;;
703+- *)
704+- echo "Usage: $0 {start|stop|restart|status|reload}"
705+- exit 1
706+- ;;
707+-esac
708+-
709+diff -Nurb '--exclude=.bzr' likewise-open/git-build/config/init-base.sh.in likewise-open.new/git-build/config/init-base.sh.in
710+--- likewise-open/git-build/config/init-base.sh.in 1969-12-31 16:00:00.000000000 -0800
711++++ likewise-open.new/git-build/config/init-base.sh.in 2011-09-09 14:27:31.000000000 -0700
712+@@ -0,0 +1,679 @@
713++#!/bin/sh
714++
715++# Generic cross-platform init script logic
716++# Copyright (c) Likewise Software, Inc.
717++# All rights reserved.
718++#
719++# Authors: Jerry Carter (gcarter@likewisesoftware.com)
720++# Kyle Stemen (kstemen@likewisesoftware.com)
721++# Brian Koropoff (bkoropoff@likewisesoftware.com)
722++
723++# Implict arguments to this script when sourced:
724++#
725++# PROG_DESC - English description of program/service
726++# PROG_BIN - path to the program binary
727++# PROG_ARGS - additional arguments to pass to program on startup
728++# PROG_ERR - file where error diagnostics are logged
729++# PIDFILE - file where pid is stored (or empty/unset if a pid file is not created)
730++# SCRIPTNAME - the name of the init script
731++
732++## Have to set the path for HP-UX boot process
733++PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
734++export PATH
735++
736++alias_replacement()
737++{
738++ # Simulates the alias builtin function. It does this by creating a function
739++ # with the name of what should be aliased. So if it was run like this:
740++ # alias_replacement myecho='echo my'
741++ # Then the alias would be emulated like this:
742++ # myecho()
743++ # {
744++ # echo my "$@"
745++ # }
746++ if [ "$#" -ne 1 ]; then
747++ echo "alias takes 1 argument"
748++ return 1
749++ fi
750++ # This function is passed something like abc=xyz . The name variable gets
751++ # set to abc, and value gets set to xyz .
752++ name="`expr "$1" : '^\(.*\)='`"
753++ value="`expr "$1" : '.*=\(.*\)$'`"
754++ eval "$name() { $value \"\$@\"; }"
755++}
756++
757++alias aliastest=echo
758++type aliastest 1>/dev/null 2>/dev/null
759++alias_works=$?
760++
761++_test_alias() { false; }
762++alias _test_alias="true"
763++case a in a) _test_alias; alias_case_works=$?;; esac
764++eval '_test_alias >/dev/null 2>&1'
765++alias_eval_works=$?
766++
767++if [ $alias_works -ne 0 -o $alias_case_works -ne 0 ]
768++then
769++ ( alias() { true; } ) >/dev/null 2>&1
770++ can_overwrite_builtins=$?
771++ unset alias >/dev/null 2>&1
772++
773++ if [ $alias_eval_works -eq 0 -a $can_overwrite_builtins -ne 0 ]; then
774++ # This is HP-UX. The alias command only takes effect when the file
775++ # is read. Furthermore, HP-UX won't let us redefine shell
776++ # builtins as system functions. So we'll have to alias
777++ # whatever shell builtins we need to now, and reread the file. The
778++ # alias_replacement function can realias the shell builtins after
779++ # they are renamed.
780++ echo_rename()
781++ {
782++ echo "$@"
783++ }
784++ alias echo=echo_rename
785++ alias alias=alias_replacement
786++ # It would cause problems if these aliases are left around for
787++ # when this script is resourced.
788++ unalias _test_alias
789++ unalias aliastest
790++ # Resource this script
791++ . @MK_LIBEXECDIR@/init-base.sh
792++ exit $?
793++ fi
794++
795++ # This platform doesn't have a working alias (at all). It needs to be
796++ # replaced. This is primarily for Solaris and FreeBSD.
797++ alias()
798++ {
799++ alias_replacement "$@"
800++ }
801++fi
802++
803++
804++##
805++## Determine what platform we are on
806++##
807++PLATFORM=""
808++if [ -f /etc/init.d/functions ]; then
809++ . /etc/init.d/functions
810++ PLATFORM="REDHAT"
811++elif [ -f /etc/rc.status ]; then
812++ . /etc/rc.status
813++ PLATFORM="SUSE"
814++elif [ -f /etc/debian_version ]; then
815++ . /lib/lsb/init-functions
816++ PLATFORM="DEBIAN"
817++elif [ "`uname -s`" = 'AIX' ]; then
818++ PLATFORM="AIX"
819++elif [ "`uname -s`" = 'HP-UX' ]; then
820++ PLATFORM="HP-UX"
821++elif [ "`uname -s`" = 'SunOS' ]; then
822++ PLATFORM="SOLARIS"
823++elif [ "`uname -s`" = 'VMkernel' ]; then
824++ PLATFORM="ESXI"
825++elif [ "`uname`" = "FreeBSD" -o "`uname`" = "Isilon OneFS" ]; then
826++ PLATFORM="FREEBSD"
827++ extra_commands="reload"
828++ reload_cmd=daemon_reload
829++ status_cmd=daemon_status
830++ start_cmd=daemon_start
831++ stop_cmd=daemon_stop
832++else
833++ PLATFORM="UNKNOWN"
834++fi
835++
836++if [ -f /etc/rc.subr ]; then
837++ . /etc/rc.subr
838++fi
839++
840++if [ $PLATFORM = "HP-UX" -o $PLATFORM = "SOLARIS" -o $PLATFORM = "FREEBSD" ]; then
841++ LOCKFILE="/var/run/${SCRIPTNAME}.lock"
842++else
843++ LOCKFILE="/var/lock/subsys/${SCRIPTNAME}"
844++fi
845++
846++type printf 1>/dev/null 2>/dev/null
847++if [ $? -ne 0 ]; then
848++ # Usually printf is a shell built in, but on HPUX it is a program located
849++ # at /bin/printf. During system startup and shutdown the path is only
850++ # /sbin, so we need to manually find printf
851++ if [ -x /bin/printf ]; then
852++ alias printf=/bin/printf
853++ else
854++ echo "WARNING: unable to find printf program"
855++ fi
856++fi
857++
858++# echo_replacement emulates echo for all platforms using printf. printf is a
859++# shell builtin that exists on all platforms.
860++echo_replacement()
861++{
862++ if [ "$1" = "-n" ]; then
863++ shift;
864++ printf %s "$*"
865++ else
866++ printf %s\\n "$*"
867++ fi
868++}
869++
870++# 'echo -n' works with bash, but not with sh on Solaris, HPUX, and AIX.
871++if [ "`echo -n`" = "-n" ]; then
872++ alias echo=echo_replacement
873++fi
874++
875++seq_replacement()
876++{
877++ FIRST=1
878++ INCREMENT=1
879++ case "$#" in
880++ 0)
881++ echo too few arguments
882++ return 1
883++ ;;
884++ 1)
885++ LAST="$1"
886++ ;;
887++ 2)
888++ FIRST="$1"
889++ LAST="$2"
890++ ;;
891++ 3)
892++ FIRST="$1"
893++ INCREMENT="$2"
894++ LAST="$3"
895++ ;;
896++ *)
897++ echo too many arguments
898++ return 1
899++ ;;
900++ esac
901++ i="$FIRST"
902++ while [ "$i" -le "$LAST" ]; do
903++ echo "$i"
904++ i="`expr "$i" + "$INCREMENT"`"
905++ done
906++ return 0;
907++}
908++
909++# seq doesn't exist on HPUX or FreeBSD
910++type seq 2>/dev/null 1>/dev/null
911++if [ $? -ne 0 ]; then
912++ alias seq=seq_replacement
913++fi
914++
915++##
916++## small wrapper functions around distro specific calls
917++##
918++
919++status_success() {
920++ case "${PLATFORM}" in
921++ REDHAT)
922++ echo_success
923++ echo
924++ ;;
925++ SUSE)
926++ rc_reset
927++ rc_status -v
928++ ;;
929++ DEBIAN)
930++ ;;
931++ AIX | HP-UX | SOLARIS | FREEBSD | ESXI | UNKNOWN)
932++ echo "...ok"
933++ ;;
934++ esac
935++}
936++
937++status_failed() {
938++ status=$1
939++ case "${PLATFORM}" in
940++ REDHAT)
941++ echo_failure
942++ echo
943++ ;;
944++ SUSE)
945++ rc_failed $status
946++ rc_status -v
947++ ;;
948++ DEBIAN)
949++ ;;
950++ AIX | HP-UX | SOLARIS | ESXI | UNKNOWN)
951++ echo "...failed"
952++ ;;
953++ esac
954++}
955++
956++print_status () {
957++ status=$1
958++
959++ if [ $status = 0 ]; then
960++ status_success
961++ else
962++ status_failed $status
963++ fi
964++}
965++
966++generic_status()
967++{
968++ #Uses return codes specified in
969++ # http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
970++ pids="`generic_pid`"
971++ #Take the list of pids and get just the last one
972++ pid=""
973++ for i in $pids; do
974++ pid="$i"
975++ done
976++
977++ if [ -n "$pid" ]
978++ then
979++ #Is the pid valid?
980++ #Does the program with that pid match our program name?
981++ #HP-UX needs UNIX95 set to support the -o option
982++ if [ "${PLATFORM}" = "ESXI" ]; then
983++ if kill -0 $pid > /dev/null 2>&1 ; then
984++ # pid is valid. have to assume it's the right program
985++ return 0
986++ else
987++ return 1
988++ fi
989++ fi
990++ pid_comm="`UNIX95=1 ps -p "$pid" -o args= 2>/dev/null | awk '{print $1}'`"
991++ if [ "$pid_comm" = "<defunct>" ]; then
992++ #It is a zombie process
993++ return 4
994++ fi
995++ if [ "$pid_comm" = "${PROG_BIN}" ]; then
996++ #If the system keeps cmdline files, check it
997++ if [ -f /proc/${pid}/cmdline ]; then
998++ #We can't check the exe file because we may be looking
999++ #at a version of the program that has been overwritten
1000++ grep -q ${PROG_BIN} /proc/${pid}/cmdline && return 0
1001++ else
1002++ return 0
1003++ fi
1004++ fi
1005++
1006++ #Program is dead, but lock file exists
1007++ [ -f "${LOCKFILE}" ] && return 2
1008++
1009++ #Program is dead, but pid file exists
1010++ return 1
1011++ else
1012++ return 3
1013++ fi
1014++}
1015++
1016++generic_pid()
1017++{
1018++ if [ -n "${PIDFILE}" -a -f "${PIDFILE}" ]
1019++ then
1020++ cat "${PIDFILE}"
1021++ else
1022++ case "${PLATFORM}" in
1023++ FREEBSD)
1024++ pgrep -f "^${PROG_BIN}"
1025++ ;;
1026++ ESXI)
1027++ ( ps | grep "^[0-9]* [0-9]* `basename ${PROG_BIN}` *${PROG_BIN}" | awk '{ print $1 };' | head -1 )
1028++ ;;
1029++ HP-UX)
1030++ ( UNIX95= ps -e -o pid= -o args= | grep "^ *[0123456789]* *${PROG_BIN}" | awk '{ print $1 };' )
1031++ ;;
1032++ *)
1033++ ( UNIX95=1; ps -e -o pid= -o args= | grep "^ *[0123456789]* *${PROG_BIN}" | awk '{ print $1 };' )
1034++ ;;
1035++ esac
1036++ fi
1037++}
1038++
1039++check_load_path()
1040++{
1041++ libdir=/opt/likewise/lib
1042++ if [ -x /opt/likewise/lib64 ]; then
1043++ libdir=/opt/likewise/lib64
1044++ fi
1045++ for name in LD_LIBRARY_PATH LIBPATH SHLIB_PATH; do
1046++ eval value=\$$name
1047++ if [ -n "$value" ]; then
1048++ expr "$value" : "^$libdir:" >/dev/null
1049++ if [ $? -ne 0 ]; then
1050++ if type logger >/dev/null 2>&1; then
1051++ logger -p daemon.error "LD_LIBRARY_PATH, LIBPATH, and SHLIB_PATH must be unset or list $libdir as the first directory. Likewise daemons will automatically unset the variable, but this variable still must be changed for the rest of your system. See the \"Requirements for the Agent\" section of the Likewise manual for more information."
1052++ fi
1053++ unset $name
1054++ export $name
1055++ fi
1056++ fi
1057++ done
1058++ if [ -n "$LD_PRELOAD" ]; then
1059++ if type logger >/dev/null 2>&1; then
1060++ logger -p daemon.error "LD_PRELOAD must be unset. Likewise daemons will automatically unset the variable, but this variable still must be changed for the rest of your system. See the \"Requirements for the Agent\" section of the Likewise manual for more information."
1061++ fi
1062++ unset LD_PRELOAD
1063++ export LD_PRELOAD
1064++ fi
1065++}
1066++
1067++daemon_start() {
1068++
1069++ if [ -f "${PROG_ERR}" ]; then
1070++ /bin/rm -f $PROG_ERR;
1071++ fi
1072++
1073++ if [ -n "${STARTHOOK}" ]; then
1074++ ${STARTHOOK}
1075++ fi
1076++
1077++ check_load_path
1078++
1079++ case "${PLATFORM}" in
1080++ REDHAT)
1081++ echo -n $"Starting `basename ${PROG_BIN}`: "
1082++ daemon ${PROG_BIN} ${PROG_ARGS}
1083++ status=$?
1084++ ;;
1085++ SUSE)
1086++ echo -n "Starting $PROG_DESC"
1087++ startproc ${PROG_BIN} ${PROG_ARGS}
1088++ status=$?
1089++ ;;
1090++ DEBIAN)
1091++ log_daemon_msg "Starting $PROG_DESC: `basename $PROG_BIN`"
1092++ start-stop-daemon --start --exec ${PROG_BIN} -- ${PROG_ARGS}
1093++ status=$?
1094++ log_end_msg $status
1095++ ;;
1096++ AIX)
1097++ echo -n "Starting $PROG_DESC"
1098++ if (lssrc -s dhcpcd | grep active >/dev/null); then
1099++ # Wait up to 30 seconds for an ip address
1100++ for i in `seq 30`; do
1101++ ifconfig -a | grep inet | grep -v 127.0.0 | grep -v 0.0.0.0 | grep -v ::1/0 >/dev/null && break
1102++ sleep 1
1103++ done
1104++ fi
1105++ ${PROG_BIN} ${PROG_ARGS}
1106++ status=$?
1107++ if [ $status -eq 0 ]; then
1108++ status=1
1109++ for i in `seq 5`; do
1110++ #Did the program start?
1111++ generic_status
1112++ status=$?
1113++ [ $status -eq 0 ] && break
1114++ sleep 1
1115++ done
1116++ fi
1117++ ;;
1118++ HP-UX | SOLARIS | FREEBSD | ESXI)
1119++ echo -n "Starting $PROG_DESC"
1120++ if type svcadm >/dev/null 2>&1 ; then
1121++ # Use the solaris service manager
1122++
1123++ # This will start the program again if it was in maintenance
1124++ # mode.
1125++ svcadm clear "$SCRIPTNAME" 2>/dev/null
1126++ # This will start the program again if it was disabled.
1127++ svcadm enable "$SCRIPTNAME"
1128++ status=$?
1129++ else
1130++ ${PROG_BIN} ${PROG_ARGS}
1131++ status=$?
1132++ fi
1133++ if [ $status -eq 0 ]; then
1134++ status=1
1135++ for i in `seq 5`; do
1136++ #Did the program start?
1137++ generic_status
1138++ status=$?
1139++ [ $status -eq 0 ] && break
1140++ sleep 1
1141++ done
1142++ fi
1143++ ;;
1144++ UNKNOWN)
1145++ ${PROG_BIN} ${PROG_ARGS}
1146++ status=$?
1147++ ;;
1148++ esac
1149++
1150++ if [ -n "${POSTSTARTHOOK}" ]; then
1151++ ${POSTSTARTHOOK}
1152++ fi
1153++
1154++ [ $status = 0 ] && [ ${PLATFORM} != "DEBIAN" ] && touch ${LOCKFILE}
1155++ return $status
1156++}
1157++
1158++daemon_stop() {
1159++ case "${PLATFORM}" in
1160++ REDHAT)
1161++ echo -n $"Stopping `basename ${PROG_BIN}`: "
1162++ killproc `basename ${PROG_BIN}`
1163++ status=$?
1164++ ;;
1165++ SUSE)
1166++ echo -n "Stopping $PROG_DESC "
1167++ killproc -TERM ${PROG_BIN}
1168++ status=$?
1169++ ;;
1170++ DEBIAN)
1171++ log_daemon_msg "Stopping $PROG_DESC: `basename $PROG_BIN`"
1172++ status=1
1173++ #only try to stop the daemon if it is running
1174++ if generic_status; then
1175++ kill -TERM "`generic_pid`"
1176++ # Forget our pidfile since it will now be invalid
1177++ # if is still present. This means generic_status
1178++ # will fall back on ps to see if the daemon is still
1179++ # running. This is important on LinuxThreads-based
1180++ # systems where other threads can still be in the process
1181++ # of shutting down even when the main thread has exited
1182++ PIDFILE=""
1183++ #Wait up to 5 seconds for the program to end
1184++ for i in `seq 5`; do
1185++ #Did the program end?
1186++ generic_status
1187++ # Make sure the agent is not running and is not a zombie
1188++ # process.
1189++ [ $? -ne 0 -a $? -ne 4 ] && status=0 && break
1190++ # use the following line instead after bug 3634 is fixed
1191++ #[ $? -eq 3 -o $? -eq 2 ] && status=0 && break
1192++ sleep 1
1193++ done
1194++ fi
1195++ log_end_msg $status
1196++ ;;
1197++ AIX | HP-UX | SOLARIS | FREEBSD | ESXI)
1198++ echo -n "Stopping $PROG_DESC"
1199++ status=1
1200++ #only try to stop the daemon if it is running
1201++ if generic_status; then
1202++ pid="`generic_pid`"
1203++ kill -TERM $pid
1204++
1205++ #Wait up to 5 seconds for the program to end
1206++ for i in `seq 5`; do
1207++ #Did the program end?
1208++ generic_status
1209++ # Make sure the agent is not running and is not a zombie
1210++ # process.
1211++ [ $? -ne 0 -a $? -ne 4 ] && status=0 && break
1212++ # use the following line instead after bug 3634 is fixed
1213++ #[ $? -eq 3 -o $? -eq 2 ] && status=0 && break
1214++ sleep 1
1215++ done
1216++ fi
1217++ ;;
1218++ UNKNOWN)
1219++ killall -TERM `basename ${PROG_BIN}`
1220++ status=$?
1221++ ;;
1222++ esac
1223++
1224++ [ $status = 0 ] && /bin/rm -f ${LOCKFILE}
1225++ return $status
1226++}
1227++
1228++daemon_reload()
1229++{
1230++ case "${PLATFORM}" in
1231++ REDHAT | SUSE | FREEBSD | ESXI)
1232++ echo -n $"Reloading ${PROG_DESC} configuration"
1233++ killall -HUP "`basename ${PROG_BIN}`"
1234++ status=$?
1235++ ;;
1236++ DEBIAN)
1237++ log_daemon_msg "Reloading $PROG_DESC configuration"
1238++ killall -HUP "`basename ${PROG_BIN}`"
1239++ status=$?
1240++ log_end_msg $status
1241++ ;;
1242++ AIX | HP-UX | SOLARIS | UNKNOWN)
1243++ echo -n "Stopping $PROG_DESC"
1244++ generic_killall -HUP
1245++ status=$?
1246++ ;;
1247++ esac
1248++
1249++ return $status
1250++}
1251++
1252++daemon_status() {
1253++ case "${PLATFORM}" in
1254++ REDHAT)
1255++ status ${PROG_BIN}
1256++ ;;
1257++ SUSE)
1258++ checkproc ${PROG_BIN}
1259++ rc_status -v
1260++ ;;
1261++ AIX | HP-UX | SOLARIS | DEBIAN | FREEBSD | ESXI)
1262++ generic_status
1263++ status=$?
1264++ case "$status" in
1265++ 0)
1266++ echo "running";
1267++ ;;
1268++ 1)
1269++ echo "stopped";
1270++ #Use the bellow line instead after bug 3634 is fixed
1271++ #echo "died leaving pid file";
1272++ ;;
1273++ 2)
1274++ echo "died leaving lock file";
1275++ ;;
1276++ 3)
1277++ echo "stopped";
1278++ ;;
1279++ esac
1280++ return $status
1281++ ;;
1282++ UNKNOWN)
1283++ echo "Not implemented."
1284++ ;;
1285++ esac
1286++}
1287++
1288++#Sends the signal specified by the first parameter to all instances
1289++#of $PROG_BIN
1290++generic_killall()
1291++{
1292++ #This gets the list of all current running instances of PROG_BIN,
1293++ #but it can't tell which directory the program was run from. If
1294++ #cmdline is available in the proc pseudo-filesystem, we'll verify
1295++ #the pids.
1296++ unverified_pids=`generic_pid`
1297++ pids=
1298++ for pid in $unverified_pids; do
1299++ #If the system keeps cmdline files, check them
1300++ if [ -f /proc/${pid}/cmdline ]; then
1301++ #We can't check the exe file because we may be looking
1302++ #at a version of the program that has been overwritten
1303++ grep -q ${AUTHD_BIN} /proc/${pid}/cmdline && pids="$pids $pid"
1304++ else
1305++ pids="$pids $pid"
1306++ fi
1307++ done
1308++
1309++ for pid in $pids; do
1310++ [ ! -z "`UNIX95=1 ps -p $pid -o pid=`" ] && kill "$1" $pid
1311++ done
1312++
1313++ #The manpage of killall says it returns 0 if at least one process is
1314++ #killed. I can't get it to return anything other than 0. Even if no
1315++ #processes die with SIGTERM. We'll just return 0 here too
1316++ return 0
1317++}
1318++
1319++####################################################################
1320++## Main init script code
1321++##
1322++
1323++if type run_rc_command >/dev/null 2>&1; then
1324++ # Looks like this is a FreeBSD based system. We should use their arg
1325++ # parsing instead of our own.
1326++ name="$SCRIPTNAME"
1327++ rcvar="`set_rcvar`"
1328++ command="$PROG_BIN"
1329++ command_args="$PROG_ARGS"
1330++ pidfile="$PIDFILE"
1331++ eval "${name}_enable=YES"
1332++
1333++ load_rc_config "$name"
1334++ [ "$1" = "start" -a -n "${STARTHOOK}" ] && ${STARTHOOK}
1335++ check_load_path
1336++ run_rc_command "$1" || exit $?
1337++ [ "$1" = "start" -a -n "${POSTSTARTHOOK}" ] && ${POSTSTARTHOOK}
1338++ exit 0
1339++fi
1340++
1341++case "$1" in
1342++ start)
1343++ daemon_start
1344++ ret=$?
1345++ print_status $ret
1346++ ;;
1347++
1348++ stop)
1349++ daemon_stop
1350++ ret=$?
1351++ print_status $ret
1352++ ;;
1353++
1354++ # HP-UX calls this
1355++ stop_msg)
1356++ echo "Stopping $PROG_DESC"
1357++ exit 0
1358++ ;;
1359++
1360++ # HP-UX calls this
1361++ start_msg)
1362++ echo "Starting $PROG_DESC"
1363++ exit 0
1364++ ;;
1365++
1366++ restart)
1367++ daemon_stop
1368++ ret=$?
1369++ print_status $ret
1370++ daemon_start
1371++ ret=$?
1372++ print_status $ret
1373++ ;;
1374++
1375++ status)
1376++ daemon_status
1377++ ;;
1378++
1379++ reload)
1380++ # Ignore SIGHUP since killall could send it to us as well
1381++ trap '' HUP
1382++ daemon_reload
1383++ ret=$?
1384++ print_status $ret
1385++ ;;
1386++ *)
1387++ echo "Usage: $0 {start|stop|restart|status|reload}"
1388++ exit 1
1389++ ;;
1390++esac
1391++
1392+diff -Nurb '--exclude=.bzr' likewise-open/git-build/config/init-likewise.sh likewise-open.new/git-build/config/init-likewise.sh
1393+--- likewise-open/git-build/config/init-likewise.sh 2011-09-09 11:04:54.000000000 -0700
1394++++ likewise-open.new/git-build/config/init-likewise.sh 1969-12-31 16:00:00.000000000 -0800
1395+@@ -1,251 +0,0 @@
1396+-#!/bin/sh
1397+-# Implicit arguments
1398+-# PREFIX - prefix of Likewise installation
1399+-# SERVICE_NAME - name of the service
1400+-
1401+-LWSM="${PREFIX}/bin/lwsm"
1402+-
1403+-PLATFORM=""
1404+-if [ -f /etc/init.d/functions ]; then
1405+- . /etc/init.d/functions
1406+- PLATFORM="REDHAT"
1407+-elif [ -f /etc/rc.status ]; then
1408+- . /etc/rc.status
1409+- PLATFORM="SUSE"
1410+-elif [ -f /etc/debian_version ]; then
1411+- . /lib/lsb/init-functions
1412+- PLATFORM="DEBIAN"
1413+-elif [ "`uname -s`" = 'AIX' ]; then
1414+- PLATFORM="AIX"
1415+-elif [ "`uname -s`" = 'HP-UX' ]; then
1416+- PLATFORM="HP-UX"
1417+-elif [ "`uname -s`" = 'SunOS' ]; then
1418+- PLATFORM="SOLARIS"
1419+-elif [ "`uname -s`" = 'VMkernel' ]; then
1420+- PLATFORM="ESXI"
1421+-elif [ "`uname`" = "FreeBSD" ]; then
1422+- PLATFORM="FREEBSD"
1423+-else
1424+- PLATFORM="UNKNOWN"
1425+-fi
1426+-
1427+-service_description()
1428+-{
1429+- echo "Likewise Open services"
1430+-}
1431+-
1432+-service_start()
1433+-{
1434+- status=""
1435+-
1436+- case "${PLATFORM}" in
1437+- REDHAT)
1438+- printf "%s" "Starting `service_description`: "
1439+- ${LWSM} -q autostart
1440+- status=$?
1441+- if [ $status -eq 0 ]
1442+- then
1443+- echo_success
1444+- echo
1445+- else
1446+- echo_failure
1447+- echo
1448+- fi
1449+- ;;
1450+- SUSE)
1451+- printf "%s" "Starting `service_description`"
1452+- ${LWSM} -q autostart
1453+- status=$?
1454+- if [ $status -eq 0 ]
1455+- then
1456+- rc_reset
1457+- rc_status -v
1458+- else
1459+- rc_failed $status
1460+- rc_status -v
1461+- fi
1462+- ;;
1463+- DEBIAN)
1464+- log_daemon_msg "Starting `service_description`"
1465+- ${LWSM} -q autostart
1466+- status=$?
1467+- log_end_msg $status
1468+- ;;
1469+- HP-UX | SOLARIS | FREEBSD | ESXI | AIX)
1470+- printf "%s" "Starting `service_description`"
1471+- if [ -x /usr/sbin/svcadm ]; then
1472+- # Don't do anything!
1473+- status=0
1474+- else
1475+- ${LWSM} -q autostart
1476+- status=$?
1477+- fi
1478+-
1479+- if [ $status -eq 0 ]
1480+- then
1481+- echo " ...ok"
1482+- else
1483+- echo " ...failed"
1484+- fi
1485+- ;;
1486+- UNKNOWN)
1487+- ${LWSM} -q autostart
1488+- status=$?
1489+- ;;
1490+- esac
1491+-
1492+- return $status
1493+-}
1494+-
1495+-service_restart()
1496+-{
1497+- status=""
1498+-
1499+- case "${PLATFORM}" in
1500+- REDHAT)
1501+- printf "%s" "Restarting `service_description` (not supported)"
1502+- status=0
1503+- echo_success
1504+- ;;
1505+- SUSE)
1506+- printf "%s" "Restarting `service_description` (not supported)"
1507+- status=0
1508+- rc_reset
1509+- rc_status -v
1510+- ;;
1511+- DEBIAN)
1512+- log_daemon_msg "Restarting `service_description` (not supported)"
1513+- status=0
1514+- log_end_msg $status
1515+- ;;
1516+- HP-UX | SOLARIS | FREEBSD | ESXI | AIX)
1517+- printf "%s" "Restarting `service_description` (not supported)"
1518+- status=0
1519+- echo " ...ok"
1520+- ;;
1521+- UNKNOWN)
1522+- status=0
1523+- ;;
1524+- esac
1525+-
1526+- return $status
1527+-}
1528+-
1529+-service_stop()
1530+-{
1531+- status=""
1532+-
1533+- case "${PLATFORM}" in
1534+- REDHAT)
1535+- printf "%s" "Stopping `service_description` (not supported) "
1536+- status=0
1537+- echo_success
1538+- ;;
1539+- SUSE)
1540+- printf "%s" "Stopping `service_description` (not supported)"
1541+- status=0
1542+- rc_reset
1543+- rc_status -v
1544+- ;;
1545+- DEBIAN)
1546+- log_daemon_msg "Stopping `service_description` (not supported)"
1547+- status=0
1548+- log_end_msg $status
1549+- ;;
1550+- AIX | HP-UX | SOLARIS | FREEBSD | ESXI)
1551+- printf "%s" "Stopping `service_description` (not supported)"
1552+- status=0
1553+- echo " ...ok"
1554+- ;;
1555+- UNKNOWN)
1556+- status=0
1557+- ;;
1558+- esac
1559+-
1560+- return $status
1561+-}
1562+-
1563+-service_refresh()
1564+-{
1565+- case "${PLATFORM}" in
1566+- REDHAT)
1567+- printf "%s" "Refreshing `service_description $1` configuration"
1568+- status=0
1569+- echo_success
1570+- ;;
1571+- SUSE)
1572+- printf "%s" "Refreshing `service_description $1` configuration"
1573+- status=0
1574+- rc_reset
1575+- rc_status -v
1576+- ;;
1577+- DEBIAN)
1578+- log_daemon_msg "Refreshing `service_description $1` configuration"
1579+- status=0
1580+- log_end_msg $status
1581+- ;;
1582+- AIX | HP-UX | SOLARIS | FREEBSD | ESXI)
1583+- printf "%s" "Refreshing `service_description $1` configuration"
1584+- status=0
1585+- echo " ...ok"
1586+- ;;
1587+- UNKNOWN)
1588+- status=0
1589+- ;;
1590+- esac
1591+-
1592+- return $status
1593+-}
1594+-
1595+-if [ -f /etc/rc.subr ]; then
1596+- . /etc/rc.subr
1597+-fi
1598+-
1599+-case "$1" in
1600+- start|faststart|forcestart|onestart)
1601+- service_start "$SERVICE_NAME"
1602+- exit $?
1603+- ;;
1604+- stop|faststop|forcestop|onestop)
1605+- service_stop "$SERVICE_NAME"
1606+- exit $?
1607+- ;;
1608+- status|faststatus|forcestatus|onestop)
1609+- echo "not supported"
1610+- exit 0
1611+- ;;
1612+- restart|fastrestart|forcerestart|onerestart)
1613+- service_restart "$SERVICE_NAME"
1614+- exit $?
1615+- ;;
1616+- refresh|reload)
1617+- service_refresh "$SERVICE_NAME"
1618+- exit $?
1619+- ;;
1620+- start_msg)
1621+- echo "Starting `service_description`"
1622+- exit 0
1623+- ;;
1624+- stop_msg)
1625+- echo "Stopping `service_description` (not supported)"
1626+- exit 0
1627+- ;;
1628+- rcvar|fastrcvar|forcercvar|onercvar)
1629+- if type run_rc_command >/dev/null 2>&1; then
1630+- # Looks like this is a FreeBSD based system.
1631+- name=likewise
1632+- rcvar="`set_rcvar`"
1633+- start_cmd="service_start"
1634+- stop_cmd="service_stop"
1635+- eval "${name}_enable=YES"
1636+-
1637+- load_rc_config "$name"
1638+- run_rc_command "$1" || exit $?
1639+- exit 0
1640+- fi
1641+- ;;
1642+- *)
1643+- echo "Unrecognized command: $1"
1644+- exit 1
1645+- ;;
1646+-esac
1647+diff -Nurb '--exclude=.bzr' likewise-open/git-build/config/init-likewise.sh.in likewise-open.new/git-build/config/init-likewise.sh.in
1648+--- likewise-open/git-build/config/init-likewise.sh.in 1969-12-31 16:00:00.000000000 -0800
1649++++ likewise-open.new/git-build/config/init-likewise.sh.in 2011-09-09 11:04:54.000000000 -0700
1650+@@ -0,0 +1,251 @@
1651++#!/bin/sh
1652++# Implicit arguments
1653++# PREFIX - prefix of Likewise installation
1654++# SERVICE_NAME - name of the service
1655++
1656++LWSM="${PREFIX}/bin/lwsm"
1657++
1658++PLATFORM=""
1659++if [ -f /etc/init.d/functions ]; then
1660++ . /etc/init.d/functions
1661++ PLATFORM="REDHAT"
1662++elif [ -f /etc/rc.status ]; then
1663++ . /etc/rc.status
1664++ PLATFORM="SUSE"
1665++elif [ -f /etc/debian_version ]; then
1666++ . /lib/lsb/init-functions
1667++ PLATFORM="DEBIAN"
1668++elif [ "`uname -s`" = 'AIX' ]; then
1669++ PLATFORM="AIX"
1670++elif [ "`uname -s`" = 'HP-UX' ]; then
1671++ PLATFORM="HP-UX"
1672++elif [ "`uname -s`" = 'SunOS' ]; then
1673++ PLATFORM="SOLARIS"
1674++elif [ "`uname -s`" = 'VMkernel' ]; then
1675++ PLATFORM="ESXI"
1676++elif [ "`uname`" = "FreeBSD" ]; then
1677++ PLATFORM="FREEBSD"
1678++else
1679++ PLATFORM="UNKNOWN"
1680++fi
1681++
1682++service_description()
1683++{
1684++ echo "Likewise Open services"
1685++}
1686++
1687++service_start()
1688++{
1689++ status=""
1690++
1691++ case "${PLATFORM}" in
1692++ REDHAT)
1693++ printf "%s" "Starting `service_description`: "
1694++ ${LWSM} -q autostart
1695++ status=$?
1696++ if [ $status -eq 0 ]
1697++ then
1698++ echo_success
1699++ echo
1700++ else
1701++ echo_failure
1702++ echo
1703++ fi
1704++ ;;
1705++ SUSE)
1706++ printf "%s" "Starting `service_description`"
1707++ ${LWSM} -q autostart
1708++ status=$?
1709++ if [ $status -eq 0 ]
1710++ then
1711++ rc_reset
1712++ rc_status -v
1713++ else
1714++ rc_failed $status
1715++ rc_status -v
1716++ fi
1717++ ;;
1718++ DEBIAN)
1719++ log_daemon_msg "Starting `service_description`"
1720++ ${LWSM} -q autostart
1721++ status=$?
1722++ log_end_msg $status
1723++ ;;
1724++ HP-UX | SOLARIS | FREEBSD | ESXI | AIX)
1725++ printf "%s" "Starting `service_description`"
1726++ if [ -x /usr/sbin/svcadm ]; then
1727++ # Don't do anything!
1728++ status=0
1729++ else
1730++ ${LWSM} -q autostart
1731++ status=$?
1732++ fi
1733++
1734++ if [ $status -eq 0 ]
1735++ then
1736++ echo " ...ok"
1737++ else
1738++ echo " ...failed"
1739++ fi
1740++ ;;
1741++ UNKNOWN)
1742++ ${LWSM} -q autostart
1743++ status=$?
1744++ ;;
1745++ esac
1746++
1747++ return $status
1748++}
1749++
1750++service_restart()
1751++{
1752++ status=""
1753++
1754++ case "${PLATFORM}" in
1755++ REDHAT)
1756++ printf "%s" "Restarting `service_description` (not supported)"
1757++ status=0
1758++ echo_success
1759++ ;;
1760++ SUSE)
1761++ printf "%s" "Restarting `service_description` (not supported)"
1762++ status=0
1763++ rc_reset
1764++ rc_status -v
1765++ ;;
1766++ DEBIAN)
1767++ log_daemon_msg "Restarting `service_description` (not supported)"
1768++ status=0
1769++ log_end_msg $status
1770++ ;;
1771++ HP-UX | SOLARIS | FREEBSD | ESXI | AIX)
1772++ printf "%s" "Restarting `service_description` (not supported)"
1773++ status=0
1774++ echo " ...ok"
1775++ ;;
1776++ UNKNOWN)
1777++ status=0
1778++ ;;
1779++ esac
1780++
1781++ return $status
1782++}
1783++
1784++service_stop()
1785++{
1786++ status=""
1787++
1788++ case "${PLATFORM}" in
1789++ REDHAT)
1790++ printf "%s" "Stopping `service_description` (not supported) "
1791++ status=0
1792++ echo_success
1793++ ;;
1794++ SUSE)
1795++ printf "%s" "Stopping `service_description` (not supported)"
1796++ status=0
1797++ rc_reset
1798++ rc_status -v
1799++ ;;
1800++ DEBIAN)
1801++ log_daemon_msg "Stopping `service_description` (not supported)"
1802++ status=0
1803++ log_end_msg $status
1804++ ;;
1805++ AIX | HP-UX | SOLARIS | FREEBSD | ESXI)
1806++ printf "%s" "Stopping `service_description` (not supported)"
1807++ status=0
1808++ echo " ...ok"
1809++ ;;
1810++ UNKNOWN)
1811++ status=0
1812++ ;;
1813++ esac
1814++
1815++ return $status
1816++}
1817++
1818++service_refresh()
1819++{
1820++ case "${PLATFORM}" in
1821++ REDHAT)
1822++ printf "%s" "Refreshing `service_description $1` configuration"
1823++ status=0
1824++ echo_success
1825++ ;;
1826++ SUSE)
1827++ printf "%s" "Refreshing `service_description $1` configuration"
1828++ status=0
1829++ rc_reset
1830++ rc_status -v
1831++ ;;
1832++ DEBIAN)
1833++ log_daemon_msg "Refreshing `service_description $1` configuration"
1834++ status=0
1835++ log_end_msg $status
1836++ ;;
1837++ AIX | HP-UX | SOLARIS | FREEBSD | ESXI)
1838++ printf "%s" "Refreshing `service_description $1` configuration"
1839++ status=0
1840++ echo " ...ok"
1841++ ;;
1842++ UNKNOWN)
1843++ status=0
1844++ ;;
1845++ esac
1846++
1847++ return $status
1848++}
1849++
1850++if [ -f /etc/rc.subr ]; then
1851++ . /etc/rc.subr
1852++fi
1853++
1854++case "$1" in
1855++ start|faststart|forcestart|onestart)
1856++ service_start "$SERVICE_NAME"
1857++ exit $?
1858++ ;;
1859++ stop|faststop|forcestop|onestop)
1860++ service_stop "$SERVICE_NAME"
1861++ exit $?
1862++ ;;
1863++ status|faststatus|forcestatus|onestop)
1864++ echo "not supported"
1865++ exit 0
1866++ ;;
1867++ restart|fastrestart|forcerestart|onerestart)
1868++ service_restart "$SERVICE_NAME"
1869++ exit $?
1870++ ;;
1871++ refresh|reload)
1872++ service_refresh "$SERVICE_NAME"
1873++ exit $?
1874++ ;;
1875++ start_msg)
1876++ echo "Starting `service_description`"
1877++ exit 0
1878++ ;;
1879++ stop_msg)
1880++ echo "Stopping `service_description` (not supported)"
1881++ exit 0
1882++ ;;
1883++ rcvar|fastrcvar|forcercvar|onercvar)
1884++ if type run_rc_command >/dev/null 2>&1; then
1885++ # Looks like this is a FreeBSD based system.
1886++ name=likewise
1887++ rcvar="`set_rcvar`"
1888++ start_cmd="service_start"
1889++ stop_cmd="service_stop"
1890++ eval "${name}_enable=YES"
1891++
1892++ load_rc_config "$name"
1893++ run_rc_command "$1" || exit $?
1894++ exit 0
1895++ fi
1896++ ;;
1897++ *)
1898++ echo "Unrecognized command: $1"
1899++ exit 1
1900++ ;;
1901++esac
1902+diff -Nurb '--exclude=.bzr' likewise-open/git-build/config/likewise likewise-open.new/git-build/config/likewise
1903+--- likewise-open/git-build/config/likewise 2011-09-09 11:04:54.000000000 -0700
1904++++ likewise-open.new/git-build/config/likewise 1969-12-31 16:00:00.000000000 -0800
1905+@@ -1,36 +0,0 @@
1906+-#! /bin/sh
1907+-# ex: set tabstop=4 expandtab shiftwidth=4:
1908+-#
1909+-# Copyright (c) Likewise Software. All rights reserved.
1910+-#
1911+-#LWI_STARTUP_TYPE_REDHAT###
1912+-#LWI_STARTUP_TYPE_REDHAT# chkconfig: 35 21 9
1913+-#LWI_STARTUP_TYPE_REDHAT# description: Start Likewise Open services
1914+-#LWI_STARTUP_TYPE_REDHAT###
1915+-#LWI_STARTUP_TYPE_REDHAT#
1916+-#LWI_STARTUP_TYPE_SUSE### BEGIN INIT INFO
1917+-#LWI_STARTUP_TYPE_SUSE# Provides: likewise
1918+-#LWI_STARTUP_TYPE_SUSE# Required-Start: $network $remote_fs lwsmd
1919+-#LWI_STARTUP_TYPE_SUSE# Required-Stop:
1920+-#LWI_STARTUP_TYPE_SUSE# Default-Start: 3 5
1921+-#LWI_STARTUP_TYPE_SUSE# Default-Stop:
1922+-#LWI_STARTUP_TYPE_SUSE# Description: Start Likewise Open services
1923+-#LWI_STARTUP_TYPE_SUSE### END INIT INFO
1924+-#LWI_STARTUP_TYPE_DEBIAN### BEGIN INIT INFO
1925+-#LWI_STARTUP_TYPE_DEBIAN# Provides: likewise
1926+-#LWI_STARTUP_TYPE_DEBIAN# Required-Start: $network $remote_fs $syslog lwsmd
1927+-#LWI_STARTUP_TYPE_DEBIAN# Required-Stop:
1928+-#LWI_STARTUP_TYPE_DEBIAN# X-Start-Before: cron
1929+-#LWI_STARTUP_TYPE_DEBIAN# X-Start-After:
1930+-#LWI_STARTUP_TYPE_DEBIAN# Default-Start: 2 3 4 5
1931+-#LWI_STARTUP_TYPE_DEBIAN# Default-Stop:
1932+-#LWI_STARTUP_TYPE_DEBIAN# Description: Start Likewise Open services
1933+-#LWI_STARTUP_TYPE_DEBIAN### END INIT INFO
1934+-#LWI_STARTUP_TYPE_FREEBSD# PROVIDE: likewise
1935+-#LWI_STARTUP_TYPE_FREEBSD# REQUIRE: NETWORKING lwsmd
1936+-#LWI_STARTUP_TYPE_FREEBSD# BEFORE: LOGIN
1937+-
1938+-PREFIX="PREFIX_DIR"
1939+-SERVICE_NAME="likewise"
1940+-
1941+-. EXECDIR/init-likewise.sh
1942+diff -Nurb '--exclude=.bzr' likewise-open/git-build/config/likewise.in likewise-open.new/git-build/config/likewise.in
1943+--- likewise-open/git-build/config/likewise.in 1969-12-31 16:00:00.000000000 -0800
1944++++ likewise-open.new/git-build/config/likewise.in 2011-09-09 14:25:19.000000000 -0700
1945+@@ -0,0 +1,36 @@
1946++#! /bin/sh
1947++# ex: set tabstop=4 expandtab shiftwidth=4:
1948++#
1949++# Copyright (c) Likewise Software. All rights reserved.
1950++#
1951++#LWI_STARTUP_TYPE_REDHAT###
1952++#LWI_STARTUP_TYPE_REDHAT# chkconfig: 35 21 9
1953++#LWI_STARTUP_TYPE_REDHAT# description: Start Likewise Open services
1954++#LWI_STARTUP_TYPE_REDHAT###
1955++#LWI_STARTUP_TYPE_REDHAT#
1956++#LWI_STARTUP_TYPE_SUSE### BEGIN INIT INFO
1957++#LWI_STARTUP_TYPE_SUSE# Provides: likewise
1958++#LWI_STARTUP_TYPE_SUSE# Required-Start: $network $remote_fs lwsmd
1959++#LWI_STARTUP_TYPE_SUSE# Required-Stop:
1960++#LWI_STARTUP_TYPE_SUSE# Default-Start: 3 5
1961++#LWI_STARTUP_TYPE_SUSE# Default-Stop:
1962++#LWI_STARTUP_TYPE_SUSE# Description: Start Likewise Open services
1963++#LWI_STARTUP_TYPE_SUSE### END INIT INFO
1964++#LWI_STARTUP_TYPE_DEBIAN### BEGIN INIT INFO
1965++#LWI_STARTUP_TYPE_DEBIAN# Provides: likewise
1966++#LWI_STARTUP_TYPE_DEBIAN# Required-Start: $network $remote_fs $syslog lwsmd
1967++#LWI_STARTUP_TYPE_DEBIAN# Required-Stop:
1968++#LWI_STARTUP_TYPE_DEBIAN# X-Start-Before: cron
1969++#LWI_STARTUP_TYPE_DEBIAN# X-Start-After:
1970++#LWI_STARTUP_TYPE_DEBIAN# Default-Start: 2 3 4 5
1971++#LWI_STARTUP_TYPE_DEBIAN# Default-Stop:
1972++#LWI_STARTUP_TYPE_DEBIAN# Description: Start Likewise Open services
1973++#LWI_STARTUP_TYPE_DEBIAN### END INIT INFO
1974++#LWI_STARTUP_TYPE_FREEBSD# PROVIDE: likewise
1975++#LWI_STARTUP_TYPE_FREEBSD# REQUIRE: NETWORKING lwsmd
1976++#LWI_STARTUP_TYPE_FREEBSD# BEFORE: LOGIN
1977++
1978++PREFIX="@MK_PREFIX@"
1979++SERVICE_NAME="likewise"
1980++
1981++. @MK_LIBEXECDIR@/init-likewise.sh
1982+diff -Nurb '--exclude=.bzr' likewise-open/git-build/config/lwsmd likewise-open.new/git-build/config/lwsmd
1983+--- likewise-open/git-build/config/lwsmd 2011-09-09 11:04:54.000000000 -0700
1984++++ likewise-open.new/git-build/config/lwsmd 1969-12-31 16:00:00.000000000 -0800
1985+@@ -1,67 +0,0 @@
1986+-#! /bin/sh
1987+-# ex: set tabstop=4 expandtab shiftwidth=4:
1988+-#
1989+-# Copyright (c) Likewise Software. All rights reserved.
1990+-#
1991+-#LWI_STARTUP_TYPE_REDHAT###
1992+-#LWI_STARTUP_TYPE_REDHAT# chkconfig: 35 17 9
1993+-#LWI_STARTUP_TYPE_REDHAT# description: Start and Stop Likewise Service Manager
1994+-#LWI_STARTUP_TYPE_REDHAT###
1995+-#LWI_STARTUP_TYPE_REDHAT#
1996+-#LWI_STARTUP_TYPE_SUSE### BEGIN INIT INFO
1997+-#LWI_STARTUP_TYPE_SUSE# Provides: lwsmd
1998+-#LWI_STARTUP_TYPE_SUSE# Required-Start: $network $syslog
1999+-#LWI_STARTUP_TYPE_SUSE# Required-Stop:
2000+-#LWI_STARTUP_TYPE_SUSE# Default-Start: 3 5
2001+-#LWI_STARTUP_TYPE_SUSE# Default-Stop: 0 1 2 6
2002+-#LWI_STARTUP_TYPE_SUSE# Description: Start and Stop Likewise Service Manager
2003+-#LWI_STARTUP_TYPE_SUSE### END INIT INFO
2004+-#LWI_STARTUP_TYPE_DEBIAN### BEGIN INIT INFO
2005+-#LWI_STARTUP_TYPE_DEBIAN# Provides: lwsmd
2006+-#LWI_STARTUP_TYPE_DEBIAN# Required-Start:
2007+-#LWI_STARTUP_TYPE_DEBIAN# Required-Stop:
2008+-#LWI_STARTUP_TYPE_DEBIAN# Default-Start: 2 3 4 5
2009+-#LWI_STARTUP_TYPE_DEBIAN# Default-Stop: 0 1 6
2010+-#LWI_STARTUP_TYPE_DEBIAN# Description: Start and Stop Likewise Service Manager
2011+-#LWI_STARTUP_TYPE_DEBIAN### END INIT INFO
2012+-#LWI_STARTUP_TYPE_FREEBSD# PROVIDE: lwsmd
2013+-#LWI_STARTUP_TYPE_FREEBSD# REQUIRE: NETWORKING
2014+-#LWI_STARTUP_TYPE_FREEBSD# BEFORE: LOGIN
2015+-
2016+-PROG_DESC="Likewise Service Manager"
2017+-PROG_BIN=PREFIX_DIR/sbin/lwsmd
2018+-PROG_ARGS="--start-as-daemon --syslog"
2019+-PIDFILE=
2020+-SCRIPTNAME="lwsmd"
2021+-STARTHOOK="fix_locale"
2022+-
2023+-lookup_user_locale()
2024+-{
2025+- . /etc/sysconfig/language
2026+- printf 'LANG=%q; export LANG\n' "$RC_LANG"
2027+- printf 'LC_ALL=%q; export LC_ALL\n' "$RC_LC_ALL"
2028+- printf 'LC_CTYPE=%q; export LC_CTYPE\n' "$RC_LC_CTYPE"
2029+-}
2030+-
2031+-fix_locale()
2032+-{
2033+- if [ "$LC_ALL" = "POSIX" ]
2034+- then
2035+- unset LC_ALL
2036+- export LC_ALL
2037+- fi
2038+- if type locale >/dev/null &&
2039+- locale | grep LC_CTYPE | grep POSIX >/dev/null; then
2040+- if [ -f /etc/sysconfig/language ]; then
2041+- eval "`lookup_user_locale`"
2042+- elif [ -f /etc/default/locale ]; then
2043+- . /etc/default/locale
2044+- export LANG
2045+- fi
2046+- elif [ -z "$LANG" ]; then
2047+- LANG="en_US.UTF-8"
2048+- export LANG
2049+- fi
2050+-}
2051+-
2052+-. EXECDIR/init-base.sh
2053+diff -Nurb '--exclude=.bzr' likewise-open/git-build/config/lwsmd.in likewise-open.new/git-build/config/lwsmd.in
2054+--- likewise-open/git-build/config/lwsmd.in 1969-12-31 16:00:00.000000000 -0800
2055++++ likewise-open.new/git-build/config/lwsmd.in 2011-09-09 14:25:44.000000000 -0700
2056+@@ -0,0 +1,67 @@
2057++#! /bin/sh
2058++# ex: set tabstop=4 expandtab shiftwidth=4:
2059++#
2060++# Copyright (c) Likewise Software. All rights reserved.
2061++#
2062++#LWI_STARTUP_TYPE_REDHAT###
2063++#LWI_STARTUP_TYPE_REDHAT# chkconfig: 35 17 9
2064++#LWI_STARTUP_TYPE_REDHAT# description: Start and Stop Likewise Service Manager
2065++#LWI_STARTUP_TYPE_REDHAT###
2066++#LWI_STARTUP_TYPE_REDHAT#
2067++#LWI_STARTUP_TYPE_SUSE### BEGIN INIT INFO
2068++#LWI_STARTUP_TYPE_SUSE# Provides: lwsmd
2069++#LWI_STARTUP_TYPE_SUSE# Required-Start: $network $syslog
2070++#LWI_STARTUP_TYPE_SUSE# Required-Stop:
2071++#LWI_STARTUP_TYPE_SUSE# Default-Start: 3 5
2072++#LWI_STARTUP_TYPE_SUSE# Default-Stop: 0 1 2 6
2073++#LWI_STARTUP_TYPE_SUSE# Description: Start and Stop Likewise Service Manager
2074++#LWI_STARTUP_TYPE_SUSE### END INIT INFO
2075++#LWI_STARTUP_TYPE_DEBIAN### BEGIN INIT INFO
2076++#LWI_STARTUP_TYPE_DEBIAN# Provides: lwsmd
2077++#LWI_STARTUP_TYPE_DEBIAN# Required-Start:
2078++#LWI_STARTUP_TYPE_DEBIAN# Required-Stop:
2079++#LWI_STARTUP_TYPE_DEBIAN# Default-Start: 2 3 4 5
2080++#LWI_STARTUP_TYPE_DEBIAN# Default-Stop: 0 1 6
2081++#LWI_STARTUP_TYPE_DEBIAN# Description: Start and Stop Likewise Service Manager
2082++#LWI_STARTUP_TYPE_DEBIAN### END INIT INFO
2083++#LWI_STARTUP_TYPE_FREEBSD# PROVIDE: lwsmd
2084++#LWI_STARTUP_TYPE_FREEBSD# REQUIRE: NETWORKING
2085++#LWI_STARTUP_TYPE_FREEBSD# BEFORE: LOGIN
2086++
2087++PROG_DESC="Likewise Service Manager"
2088++PROG_BIN=@MK_PREFIX@/sbin/lwsmd
2089++PROG_ARGS="--start-as-daemon --syslog"
2090++PIDFILE=
2091++SCRIPTNAME="lwsmd"
2092++STARTHOOK="fix_locale"
2093++
2094++lookup_user_locale()
2095++{
2096++ . /etc/sysconfig/language
2097++ printf 'LANG=%q; export LANG\n' "$RC_LANG"
2098++ printf 'LC_ALL=%q; export LC_ALL\n' "$RC_LC_ALL"
2099++ printf 'LC_CTYPE=%q; export LC_CTYPE\n' "$RC_LC_CTYPE"
2100++}
2101++
2102++fix_locale()
2103++{
2104++ if [ "$LC_ALL" = "POSIX" ]
2105++ then
2106++ unset LC_ALL
2107++ export LC_ALL
2108++ fi
2109++ if type locale >/dev/null &&
2110++ locale | grep LC_CTYPE | grep POSIX >/dev/null; then
2111++ if [ -f /etc/sysconfig/language ]; then
2112++ eval "`lookup_user_locale`"
2113++ elif [ -f /etc/default/locale ]; then
2114++ . /etc/default/locale
2115++ export LANG
2116++ fi
2117++ elif [ -z "$LANG" ]; then
2118++ LANG="en_US.UTF-8"
2119++ export LANG
2120++ fi
2121++}
2122++
2123++. @MK_LIBEXECDIR@/init-base.sh
2124+diff -Nurb '--exclude=.bzr' likewise-open/git-build/config/MakeKitBuild likewise-open.new/git-build/config/MakeKitBuild
2125+--- likewise-open/git-build/config/MakeKitBuild 2011-09-09 11:04:54.000000000 -0700
2126++++ likewise-open.new/git-build/config/MakeKitBuild 2011-09-12 11:03:00.000000000 -0700
2127+@@ -1,14 +1,27 @@
2128+ configure()
2129+ {
2130++ mk_declare -o \
2131++ MK_PREFIX \
2132++ MK_LIBEXECDIR \
2133++ MK_SBINDIR \
2134++ LW_INITDIR \
2135++ VERSION="$LW_VERSION" \
2136++ BUILD="${LW_BUILD_ID:-0}" \
2137++ REVISION="${LW_BUILD_REVISION:-0}"
2138++
2139+ mk_output_file VERSION
2140++ mk_output_file init-base.sh
2141++ mk_output_file init-likewise.sh
2142++ mk_output_file likewise
2143++ mk_output_file lwsmd
2144+ }
2145+
2146+ make()
2147+ {
2148+- for i in init-base.sh init-likewise.sh
2149+- do
2150+- lw_init_script_helper "$i"
2151+- done
2152++ mk_stage \
2153++ DESTDIR="${MK_LIBEXECDIR}" \
2154++ MODE=0755 \
2155++ init-base.sh init-likewise.sh
2156+
2157+ mk_stage \
2158+ SOURCE="krb5.conf.default" \
2159+@@ -26,58 +39,8 @@
2160+ DESTDIR="${MK_DATADIR}" \
2161+ SOURCE="likewise.pam-auth-update"
2162+
2163+- for i in lwsmd likewise
2164+- do
2165+- lw_init_script "$i"
2166+- done
2167+-}
2168+-
2169+-lw_init_script()
2170+-{
2171+- mk_target \
2172+- TARGET="${LW_INITDIR}/$1" \
2173+- DEPS="$1" \
2174+- _lw_install_init_script '$@' "&$1"
2175+-
2176+- mk_add_all_target "$result"
2177+-}
2178+-
2179+-_lw_install_init_script()
2180+-{
2181+- mk_msg_domain init
2182+-
2183+- mk_msg "${1#$MK_STAGE_DIR}"
2184+-
2185+- mk_mkdir "${1%/*}"
2186+-
2187+- mk_run_or_fail sed \
2188+- -e "s:PREFIX_DIR:${MK_PREFIX}:g" \
2189+- -e "s:EXECDIR:${MK_LIBEXECDIR}:g" \
2190+- < "$2" > "$1"
2191+- mk_run_or_fail chmod +x "$1"
2192+-}
2193+-
2194+-lw_init_script_helper()
2195+-{
2196+- mk_target \
2197+- TARGET="${MK_LIBEXECDIR}/$1" \
2198+- DEPS="$1" \
2199+- _lw_install_init_script_helper '$@' "&$1"
2200+-
2201+- mk_add_all_target "$result"
2202+-}
2203+-
2204+-_lw_install_init_script_helper()
2205+-{
2206+- mk_msg_domain init
2207+-
2208+- mk_msg "${1#$MK_STAGE_DIR}"
2209+-
2210+- mk_mkdir "${1%/*}"
2211+-
2212+- mk_run_or_fail sed \
2213+- -e "s:PREFIX_DIR:${MK_PREFIX}:g" \
2214+- -e "s:EXECDIR:${MK_LIBEXECDIR}:g" \
2215+- < "$2" > "$1"
2216+- mk_run_or_fail chmod +x "$1"
2217++ mk_stage \
2218++ DESTDIR="${LW_INITDIR}" \
2219++ MODE=0755 \
2220++ lwsmd likewise
2221+ }
2222
2223=== modified file 'debian/patches/series'
2224--- debian/patches/series 2011-09-06 22:10:33 +0000
2225+++ debian/patches/series 2011-09-12 20:31:24 +0000
2226@@ -13,3 +13,4 @@
2227 correct_lsass_configure_platform_detection.patch
2228 arm-platform.diff
2229 arm-dcerpc.diff
2230+config-fixes-for-verbose-make.patch

Subscribers

People subscribed via source and target branches

to all changes: