Merge lp:~james-page/ubuntu/oneiric/likewise-open/make-it-work into lp:ubuntu/oneiric/likewise-open

Proposed by James Page
Status: Merged
Merge reported by: James Page
Merged at revision: not available
Proposed branch: lp:~james-page/ubuntu/oneiric/likewise-open/make-it-work
Merge into: lp:ubuntu/oneiric/likewise-open
Diff against target: 2261 lines (+2223/-0)
4 files modified
debian/changelog (+12/-0)
debian/likewise-open.postinst (+8/-0)
debian/patches/config-fixes-for-verbose-make.patch (+2202/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~james-page/ubuntu/oneiric/likewise-open/make-it-work
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+77390@code.launchpad.net

Description of the change

This MP sweeps up an existing proposal which resolves a conflict between makekit and verbose builds
and disables the npfs component on existing installs which means likewise actually starts.

I can't claim much knowledge about either fix - credit goes to Scott Sally for them.

To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote :

Oh - I have installed it on a upgraded natty system and it appears to work fine - I've not tested it completely as that requires a more complex setup but is does at least start cleanly.

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: