metainit/0000755000175000017500000000000010763541111011353 5ustar jojojojometainit/debhelper/0000755000175000017500000000000010653365465013323 5ustar jojojojometainit/debhelper/dh_metainit0000644000175000017500000000720310653365465015535 0ustar jojojojo#!/usr/bin/perl -w =head1 NAME dh_metainit - install metainit files into package build directories =cut use strict; use Debian::Debhelper::Dh_Lib; =head1 SYNOPSIS B [S>] [B<--name=>I] [B<-n>] [B<-o>] =head1 DESCRIPTION dh_metainit is a debhelper program that is responsible for installing metainit files (for further creation of initscripts via the update-metainit facility) into package build directories. It also automatically generates the postinst and postrm and prerm commands needed to create the appropriate initscripts for the init system employed on the user machine. B If generated postinst script finds /etc/init.d/ or /etc/default files with the same name as the shipped metainit files, and these are conffiles from non-installed packages (probably earlier version of this package) they are removed (or renamed if the user has modified them). This works only if the name of the new metainit is the same as the name of the old init.d and default file, otherwise you will have to remove these files yourself. See http://wiki.debian.org/DpkgConffileHandling for that. If a file named debian/package.metainit exists, then it is installed into etc/metainit/package in the package build directory, with "package" replaced by the package name. =head1 OPTIONS =over 4 =item B<-n>, B<--noscripts> Do not modify postinst/postrm/prerm scripts. =item B<-o>, B<--onlyscripts> Only modify postinst/postrm/prerm scripts, do not actually install any metainit files. May be useful if the init script is shipped and/or installed by upstream in a way that doesn't make it easy to let dh_metainit find it. =item B<--name=>I Install the metainit script using the filename I instead of the default filename, which is the package name. When this parameter is used, dh_metainit looks for and installs files named debian/package.name.metainit, instead of the usual debian/package.init. =item B<--error-handler=>I Call the named shell function if running the init script fails. The function should be provided in the prerm and postinst scripts, before the #DEBHELPER# token. =back =head1 NOTES Note that this command is not idempotent. "dh_clean -k" should be called between invocations of this command. Otherwise, it may cause multiple instances of the same text to be added to maintainer scripts. =cut init(); foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp=tmpdir($package); # Figure out what filename to install it as. my $script; my $init; if (defined $dh{NAME}) { $script=$dh{NAME}; $init=pkgfile($package,"$dh{NAME}.metainit") || pkgfile($package,'metainit'); } else { $script=$package; $init=pkgfile($package,'metainit'); } if ($init ne '' || $dh{ONLYSCRIPTS}) { if (! $dh{ONLYSCRIPTS}) { if (! -d "$tmp/etc/metainit") { doit("install","-d","$tmp/etc/metainit"); } doit("install","-p","-m644",$init,"$tmp/etc/metainit/$script.metainit"); } if (! $dh{NOSCRIPTS}) { # update-rc.d, and start script autoscript($package,"postinst", "postinst-metainit", "s/#SCRIPT#/$script/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/;s/#PACKAGE#/$package/;"); # always stops script autoscript($package,"prerm","prerm-metainit", "s/#SCRIPT#/$script/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/;s/#PACKAGE#/$package/;"); # removes rc.d links autoscript($package,"postrm","postrm-metainit", "s/#SCRIPT#/$script/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/;s/#PACKAGE#/$package/;"); } } } =head1 SEE ALSO L This program is a part of debhelper. =head1 AUTHOR Urs Ganse based on dh_installinit by Joey Hess =cut metainit/debhelper/autoscripts/0000755000175000017500000000000010636000002015651 5ustar jojojojometainit/debhelper/autoscripts/postrm-metainit0000644000175000017500000000022310635763660020756 0ustar jojojojoif [ "$1" = "purge" -a -x /usr/sbin/update-metainit ] ; then /usr/sbin/update-metainit --remove #SCRIPT# --purge >/dev/null || #ERROR_HANDLER# fi metainit/debhelper/autoscripts/prerm-metainit0000644000175000017500000000030510634045532020546 0ustar jojojojoif [ -x "/etc/init.d/#SCRIPT#" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER# else /etc/init.d/#SCRIPT# stop || #ERROR_HANDLER# fi fi metainit/debhelper/autoscripts/postinst-metainit0000644000175000017500000000222510635777657021334 0ustar jojojojo # We assume that any previous installed /etc/init.d/#SCRIPT# # and /etc/default/#SCRIPT# files that are conffiles are not wanted any more. # Code taken from http://wiki.debian.org/DpkgConffileHandling rm_conffile() { PKGNAME="$1" CONFFILE="$2" old_md5sum=`dpkg-query -W -f='${Conffiles}' $PKGNAME | awk '$3 == "obsolete" && $1=="'"$CONFFILE"'" {print $2}'` if [ -n "$old_md5sum" -a -e "$CONFFILE" ]; then md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" if [ "$md5sum" != "$old_md5sum" ]; then echo "Obsolete conffile $CONFFILE has been modified by you." echo "Saving as $CONFFILE.dpkg-bak ..." mv -f "$CONFFILE" "$CONFFILE".dpkg-bak else echo "Removing obsolete conffile $CONFFILE ..." rm -f "$CONFFILE" fi fi } rm_conffile #PACKAGE# "/etc/default/#SCRIPT#" rm_conffile #PACKAGE# "/etc/init.d/#SCRIPT#" update-metainit >/dev/null || #ERROR_HANDLER# if [ -x "/etc/init.d/#SCRIPT#" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d #SCRIPT# start || #ERROR_HANDLER# else /etc/init.d/#SCRIPT# start || #ERROR_HANDLER# fi fi metainit/examples/0000755000175000017500000000000010763540736013205 5ustar jojojojometainit/examples/infon-server.metainit0000644000175000017500000000004310635771205017346 0ustar jojojojoExec: /usr/bin/infond No-Auto: Yes metainit/examples/cron.metainit0000644000175000017500000000102610763540736015701 0ustar jojojojoShort-Description: periodic command scheduler Description: cron is a standard UNIX program that runs user-specified programs at periodic scheduled times. vixie cron adds a number of features to the basic UNIX cron, including better security and more powerful configuration options. Exec: /usr/sbin/cron -f Required-Start: $syslog $time Required-Stop: $syslog $time Prestart-Hook: echo "This is the Prestart-Hook"; echo "It outputs two lines."; Poststop-Hook: echo "This is the Poststop-Hook"; echo "All it does, is print this."; metainit/update-metainit.pod0000644000175000017500000000234210653365631015163 0ustar jojojojo=head1 NAME update-metainit - Generates init scripts =head1 SYNOPSIS B [B<--remove> I [B<--purge>] ] =head1 DESCRIPTION I solves the problem of writing good init scripts. Instead of manually creating these important files, they are derived from a declaritive description in the metainit files in I. These files can be shipped with packages or created by the local administrator. If B called without argument, it will regenerate init scripts for all the files in I. The generated files contain a large warning in form of a comment that they will be overridden. Modifications are preferably done in the files in I and made effective by running B. If needed, the administrator can prevent modified init files by removing the warning comment. =head1 OPTIONS =over 4 =item B<--remove> I This command will remove any generated and non-modified scripts that were created by the metainit file with the name I. =item B<--purge> Only usable with B<--remove>. Will remove the generated files even if modified. =back =head1 SEE ALSO dh_metainit(1) =head1 AUTHOR Joachim Breitner =cut metainit/_darcs/0000755000175000017500000000000010763540736012622 5ustar jojojojometainit/_darcs/pristine/0000755000175000017500000000000010653365657014464 5ustar jojojojometainit/_darcs/pristine/debhelper/0000755000175000017500000000000010653365543016410 5ustar jojojojometainit/_darcs/pristine/debhelper/dh_metainit0000644000175000017500000000720310653365465020625 0ustar jojojojo#!/usr/bin/perl -w =head1 NAME dh_metainit - install metainit files into package build directories =cut use strict; use Debian::Debhelper::Dh_Lib; =head1 SYNOPSIS B [S>] [B<--name=>I] [B<-n>] [B<-o>] =head1 DESCRIPTION dh_metainit is a debhelper program that is responsible for installing metainit files (for further creation of initscripts via the update-metainit facility) into package build directories. It also automatically generates the postinst and postrm and prerm commands needed to create the appropriate initscripts for the init system employed on the user machine. B If generated postinst script finds /etc/init.d/ or /etc/default files with the same name as the shipped metainit files, and these are conffiles from non-installed packages (probably earlier version of this package) they are removed (or renamed if the user has modified them). This works only if the name of the new metainit is the same as the name of the old init.d and default file, otherwise you will have to remove these files yourself. See http://wiki.debian.org/DpkgConffileHandling for that. If a file named debian/package.metainit exists, then it is installed into etc/metainit/package in the package build directory, with "package" replaced by the package name. =head1 OPTIONS =over 4 =item B<-n>, B<--noscripts> Do not modify postinst/postrm/prerm scripts. =item B<-o>, B<--onlyscripts> Only modify postinst/postrm/prerm scripts, do not actually install any metainit files. May be useful if the init script is shipped and/or installed by upstream in a way that doesn't make it easy to let dh_metainit find it. =item B<--name=>I Install the metainit script using the filename I instead of the default filename, which is the package name. When this parameter is used, dh_metainit looks for and installs files named debian/package.name.metainit, instead of the usual debian/package.init. =item B<--error-handler=>I Call the named shell function if running the init script fails. The function should be provided in the prerm and postinst scripts, before the #DEBHELPER# token. =back =head1 NOTES Note that this command is not idempotent. "dh_clean -k" should be called between invocations of this command. Otherwise, it may cause multiple instances of the same text to be added to maintainer scripts. =cut init(); foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp=tmpdir($package); # Figure out what filename to install it as. my $script; my $init; if (defined $dh{NAME}) { $script=$dh{NAME}; $init=pkgfile($package,"$dh{NAME}.metainit") || pkgfile($package,'metainit'); } else { $script=$package; $init=pkgfile($package,'metainit'); } if ($init ne '' || $dh{ONLYSCRIPTS}) { if (! $dh{ONLYSCRIPTS}) { if (! -d "$tmp/etc/metainit") { doit("install","-d","$tmp/etc/metainit"); } doit("install","-p","-m644",$init,"$tmp/etc/metainit/$script.metainit"); } if (! $dh{NOSCRIPTS}) { # update-rc.d, and start script autoscript($package,"postinst", "postinst-metainit", "s/#SCRIPT#/$script/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/;s/#PACKAGE#/$package/;"); # always stops script autoscript($package,"prerm","prerm-metainit", "s/#SCRIPT#/$script/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/;s/#PACKAGE#/$package/;"); # removes rc.d links autoscript($package,"postrm","postrm-metainit", "s/#SCRIPT#/$script/;s/#ERROR_HANDLER#/$dh{ERROR_HANDLER}/;s/#PACKAGE#/$package/;"); } } } =head1 SEE ALSO L This program is a part of debhelper. =head1 AUTHOR Urs Ganse based on dh_installinit by Joey Hess =cut metainit/_darcs/pristine/debhelper/autoscripts/0000755000175000017500000000000010636000070020746 5ustar jojojojometainit/_darcs/pristine/debhelper/autoscripts/postrm-metainit0000644000175000017500000000022310635763660024046 0ustar jojojojoif [ "$1" = "purge" -a -x /usr/sbin/update-metainit ] ; then /usr/sbin/update-metainit --remove #SCRIPT# --purge >/dev/null || #ERROR_HANDLER# fi metainit/_darcs/pristine/debhelper/autoscripts/prerm-metainit0000644000175000017500000000030510634045532023636 0ustar jojojojoif [ -x "/etc/init.d/#SCRIPT#" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d #SCRIPT# stop || #ERROR_HANDLER# else /etc/init.d/#SCRIPT# stop || #ERROR_HANDLER# fi fi metainit/_darcs/pristine/debhelper/autoscripts/postinst-metainit0000644000175000017500000000222510635777657024424 0ustar jojojojo # We assume that any previous installed /etc/init.d/#SCRIPT# # and /etc/default/#SCRIPT# files that are conffiles are not wanted any more. # Code taken from http://wiki.debian.org/DpkgConffileHandling rm_conffile() { PKGNAME="$1" CONFFILE="$2" old_md5sum=`dpkg-query -W -f='${Conffiles}' $PKGNAME | awk '$3 == "obsolete" && $1=="'"$CONFFILE"'" {print $2}'` if [ -n "$old_md5sum" -a -e "$CONFFILE" ]; then md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" if [ "$md5sum" != "$old_md5sum" ]; then echo "Obsolete conffile $CONFFILE has been modified by you." echo "Saving as $CONFFILE.dpkg-bak ..." mv -f "$CONFFILE" "$CONFFILE".dpkg-bak else echo "Removing obsolete conffile $CONFFILE ..." rm -f "$CONFFILE" fi fi } rm_conffile #PACKAGE# "/etc/default/#SCRIPT#" rm_conffile #PACKAGE# "/etc/init.d/#SCRIPT#" update-metainit >/dev/null || #ERROR_HANDLER# if [ -x "/etc/init.d/#SCRIPT#" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d #SCRIPT# start || #ERROR_HANDLER# else /etc/init.d/#SCRIPT# start || #ERROR_HANDLER# fi fi metainit/_darcs/pristine/examples/0000755000175000017500000000000010636045235016266 5ustar jojojojometainit/_darcs/pristine/examples/infon-server.metainit0000644000175000017500000000004310635771205022436 0ustar jojojojoExec: /usr/bin/infond No-Auto: Yes metainit/_darcs/pristine/examples/cron.metainit0000644000175000017500000000102610763540736020771 0ustar jojojojoShort-Description: periodic command scheduler Description: cron is a standard UNIX program that runs user-specified programs at periodic scheduled times. vixie cron adds a number of features to the basic UNIX cron, including better security and more powerful configuration options. Exec: /usr/sbin/cron -f Required-Start: $syslog $time Required-Stop: $syslog $time Prestart-Hook: echo "This is the Prestart-Hook"; echo "It outputs two lines."; Poststop-Hook: echo "This is the Poststop-Hook"; echo "All it does, is print this."; metainit/_darcs/pristine/update-metainit.pod0000644000175000017500000000234210653365631020253 0ustar jojojojo=head1 NAME update-metainit - Generates init scripts =head1 SYNOPSIS B [B<--remove> I [B<--purge>] ] =head1 DESCRIPTION I solves the problem of writing good init scripts. Instead of manually creating these important files, they are derived from a declaritive description in the metainit files in I. These files can be shipped with packages or created by the local administrator. If B called without argument, it will regenerate init scripts for all the files in I. The generated files contain a large warning in form of a comment that they will be overridden. Modifications are preferably done in the files in I and made effective by running B. If needed, the administrator can prevent modified init files by removing the warning comment. =head1 OPTIONS =over 4 =item B<--remove> I This command will remove any generated and non-modified scripts that were created by the metainit file with the name I. =item B<--purge> Only usable with B<--remove>. Will remove the generated files even if modified. =back =head1 SEE ALSO dh_metainit(1) =head1 AUTHOR Joachim Breitner =cut metainit/_darcs/pristine/update-metainit0000644000175000017500000000120410636013646017463 0ustar jojojojo#!/bin/sh # Interface: # Rebuild init scripts (e.g., after a meta init script was added or edited) # $0 # # Removed meta-init-script: # $0 --remove-metainit # # If a init sytem is removed, the maintainer scripts should # call a script that cleans up the generated files for that system directly. # This will probably be /usr/lib/metainit/translators once if test -n "$METAINIT_PREFIX" then translators_dir="$METAINIT_PREFIX/translators/" else translators_dir="/usr/share/metainit/translators/" fi # This is just a thin wrapper around the per-init-system # translators. for trans in $translators_dir/* do $trans "$@" done metainit/_darcs/pristine/utils/0000755000175000017500000000000010636547710015615 5ustar jojojojometainit/_darcs/pristine/utils/arrange-sysvinit0000644000175000017500000000707510635767423021062 0ustar jojojojo#!/usr/bin/perl use strict; use warnings; use List::Util qw(sum); my $prefix = ""; $prefix = $ENV{METAINIT_PREFIX} if $ENV{METAINIT_PREFIX}; my $metainit_path = "$prefix/etc/metainit"; my $etc = "$prefix/etc"; use MetaInit::Parse; my @new_scripts = @ARGV; my %facilities = ( '$local_fs' => 0, '$network' => 0, '$named' => 15, '$portmap' => 18, '$remote_fs' => 21, '$syslog' => 10, '$time' => 0, ); # Read in all meta-init scripts my @metainit_files = <$metainit_path/*.metainit>; my %metainits; for my $metainit_file (@metainit_files) { my $data = MetaInit::Parse::parse({ filename => $metainit_file }); $metainits{$data->{Name}} = $data; } # Locate existing scripts # We check for existing scripts only in /etc/rc2.d my %startscripts; for my $rc_file (<$etc/rc2.d/S??*>) { my ($num, $name) = $rc_file =~ m!S(\d\d)([^/]+)!; $startscripts{$name} = $num; } # Sort the scripts to existing and non-existing scripts my @existing; my @new; for my $metainit (keys %metainits) { if (exists $startscripts{$metainit}) { push @existing, $metainit; } else { push @new, $metainit; } } # Actually, we only want to treat the passed scripts as new @new = @new_scripts; # Check the dependencies for existing scripts for my $existing (@existing) { my @deps = @{$metainits{$existing}{"Required-Start"}}; for my $dep (@deps) { if (exists $startscripts{$dep}) { if ($startscripts{$dep} >= $startscripts{$existing}) { warn "Late dependency $dep of $existing.\n" } } elsif (exists $facilities{$dep}) { if ($facilities{$dep} >= $startscripts{$existing}) { warn "Late facility $dep of $existing.\n" } } elsif (not exists $startscripts{$dep}){ # Nothing to do here } else { warn "Unkown dependency $dep of $existing.\n"; } } } my @processed = (); while (@new > 0) { # Check Bounds my %lower; my %upper; for my $existing (@existing) { my @deps = @{$metainits{$existing}{"Required-Start"}}; for my $dep (@deps) { if (exists $startscripts{$dep}){ $upper{$dep} = min($startscripts{$existing}, $upper{$dep}) } } } for my $new (@new) { my @deps = @{$metainits{$new}{"Required-Start"}}; for my $dep (@deps) { if (not exists $startscripts{$dep}){ $lower{$new} = $startscripts{$dep}; $lower{$new} = max($startscripts{$dep}, $lower{$new}) } } } # Put a new scripts at appropriate location my $current = pop @new; # Standard case: if (($lower{$current}||0) > ($upper{$current}||99)) { warn "Could not correctly fit in $current, please reorder manually.\n"; $startscripts{$current} = $lower{$current}||10 + 10; push @processed, $current; push @existing, $current; } elsif (($lower{$current}||0 < 20) and not defined $upper{$current}) { $startscripts{$current} = 20; push @processed, $current; push @existing, $current; } else { $startscripts{$current} = mid($lower{$current}, $upper{$current}); } } for my $done (@processed) { printf "%s %02d\n", $done, $startscripts{$done} } sub max { return $_[1] if (defined $_[1] and $_[0] < $_[1]); return $_[0] } sub min { return $_[1] if (defined $_[1] and $_[0] > $_[1]); return $_[0] } sub mid { return sum(@_) / scalar @_; } # vim: sw=4:ts=4:expandtab metainit/_darcs/pristine/utils/create-sysvinit-file0000644000175000017500000001032010636547615021606 0ustar jojojojo#!/usr/bin/perl -w # # Creates a sysvinit file from a metainit description. # # # Note that we’d like to adhere the LSB, so see # http://refspecs.freestandards.org/LSB_2.1.0/LSB-generic/LSB-generic/iniscrptact.html # use MetaInit::Parse; $filename = shift || die "Useage: $0 \n"; my $output = shift; # Parse the metainit in %initparams = %{MetaInit::Parse::parse({ filename => $filename })}; if ($output) { open(STDOUT,'>',$output) or die "Can't open '$output': $!"; } # Print the "dynamic" part of the initscript my $rl_start = join " ", @{$initparams{"Start-Levels"}}; my $rl_stop = join " ", @{$initparams{"Stop-Levels"}}; print << "EOF"; #! /bin/sh # # This a generated file. DO NOT EDIT THIS FILE! # If you want to modify how this file works, please # modify $filename and re-run update-metainit. # # If you are sure that you want to modify this file, # remove this comment, and update-metainit will not override # this script any more. # ### BEGIN INIT INFO # Provides: $initparams{"Name"} # Default-Start: $rl_start # Default-Stop: $rl_stop # Short-Description: $initparams{"Short-Description"} EOF print "# Required-Start: " . join(" ",@{$initparams{"Required-Start"}}) . "\n"; print "# Required-Stop: " . join(" ",@{$initparams{"Required-Stop"}}) . "\n"; print "# Description: "; print join("\n# ",split("\n",$initparams{"Description"})). "\n"; print "\n"; # prevent quoted strings from breaking the generated script: my %quoted_initparams; while (my ($k, $v) = each %initparams){ $quoted_initparams{$k} = quotemeta ($v || ''); } print << "EOF" ### END INIT INFO # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC=$quoted_initparams{"Short-Description"} NAME=$quoted_initparams{"Name"} DAEMON=$initparams{"Path"} BASENAME=$initparams{"Basename"} DAEMON_ARGS=$quoted_initparams{"Args"} PIDFILE=/var/run/\$NAME.pid SCRIPTNAME=/etc/init.d/\$NAME EOF ; # ... and the rest of the initscript, that is identical for all # metainit-created scripts. print << 'EOF' # Exit if the package is not installed [ -x "$DAEMON" ] || exit 5 # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # # Function that starts the daemon/service # do_start() { EOF ; if($initparams{"Prestart-Hook"}) { print "\t" . join("\n\t",split("\n",$initparams{"Prestart-Hook"})); print "\n"; } print << 'EOF' start-stop-daemon --start --oknodo --background --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_ARGS || return 1 } # # Function that stops the daemon/service # do_stop() { start-stop-daemon --stop --oknodo --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $BASENAME RETVAL="$?" rm -f $PIDFILE return $RETVAL EOF ; if($initparams{"Poststop-Hook"}) { print "\t" . join("\n\t",split("\n",$initparams{"Poststop-Hook"})); print "\n"; } print << 'EOF'; return "$RETVAL" } # # Function that sends a SIGHUP to the daemon/service # do_reload() { start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME return 0 } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" do_start log_end_msg $? ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop log_end_msg $? ;; #reload|force-reload) # # If do_reload() is not implemented then leave this commented out # and leave 'force-reload' as an alias for 'restart'. # #log_daemon_msg "Reloading $DESC" "$NAME" #do_reload #log_end_msg $? #;; restart|force-reload) # # If the "reload" option is implemented then remove the # 'force-reload' alias # log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0) do_start log_end_msg "$?" ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 3 ;; esac EOF if ($output) { close STDOUT; chmod 0755, $output or die "Can't change permissions for '$output': $!"; } # vim: ts=4:sw=4:expandtab metainit/_darcs/pristine/lib/0000755000175000017500000000000010634572155015222 5ustar jojojojometainit/_darcs/pristine/lib/MetaInit/0000755000175000017500000000000010636545272016736 5ustar jojojojometainit/_darcs/pristine/lib/MetaInit/Parse.pm0000644000175000017500000001377310636545240020354 0ustar jojojojopackage MetaInit::Parse; use v5.008; use strict; use warnings; use Carp qw/croak/; use File::Basename; use Scalar::Util qw/openhandle/; =head1 NAME MetaInit::Parse - Parses a MetaInit definition fild =head1 SYNOPSIS $data = MetaInit::Parse::parse($filename) Opens and parses the specified file. The parsed data is handed back as a hashref, containing an entry for each definition. =head2 FILE FORMAT The file to be parsed should be in a RFC822-like format (field names and values are separated by a colon (C<:>). Lines starting with a blank are just appended to their previous line's value. Lines that contain only a period (C<.>) in them will become an empty line in the output. Empty lines are ignored. Comments are allowed - All characters after a # sign until the end of the line are ignored. If you need to include the # sign, prepend it with a backslash (\#). =head2 FIELDS A MetaInit file has several defined fields, out of which only C is mandatory: =over 4 =item Short-Description A short (~60 character) description of the daemon. Merely informative. =item Description A longer description of the daemon, usually a couple of lines long. Merely informative. =item Exec The command to execute to get the daemon to room. Please keep in mind this should start the daemon in the I, not send it to the background. =item Required-Start The facilities that should be started before this one. This can include the LSB facility names. It defaults to "B<$local_fs $network $remote_fs>. =item Required-Stop B =item Should-Start B =item Should-Stop B =item Prestart-Hook A shell snippet that should be included in the generated init script I the daemon is run =item Poststop-hook A shell snippet that should be included in the generated init script I the daemon finishes running =item No-Auto If this is set to anything, the generated init scripts will be installed in a way that the deamon is not started by default on system start up. It can still be started manually (e.g. using /etc/init.d/ start) and be configured to start automatically (e.g. by adjusting the symlinks). =back Some fields (Required-Start, Should-Start, Required-Stop and Should-Stop) will not return strings but arrayrefs - Elements will be separated by whitespace. =head1 NOTES Note that this module is written specifically for MetaInit, it will quite probably not be useful outside it. =head1 SEE ALSO The (as for now inexistent ;-) ) MetaInit documentation LSB facility names, http://refspecs.freestandards.org/LSB_2.1.0/LSB-generic/LSB-generic/facilname.html =head1 AUTHOR =cut my @splits = qw(Required-Start Should-Start Required-Stop Should-Stop); my @mandatory = qw(Exec); sub slurp_from_fh { my ($fh) = @_; return do { local $/; <$fh> }; } sub process_data { my ($data, $parsed) = @_; my $lastkey; for (split /\n/, $data) { chomp; # Ignore comments; unescape escaped #s s/[^\\]\#.*//; s/\\\#/\#/g; # Ignore empty lines; convert single dots in a line into empty lines next if /^\s*$/; s/^\s*\.\s*$//; if (my ($key, $value) = m/^(\S.*)\s*:\s*(.*)/) { $parsed->{$key} = $value; $lastkey = $key; } elsif ($lastkey) { s/^\s+//; s/^\.$//; $parsed->{$lastkey} .= "\n$_"; } else { die "Cannot parse line: ``$_''"; } } } sub fixup_results { my (%parsed) = @_; my $error_msg = ""; for my $field (@mandatory) { $error_msg .= "Mandatory field `$field' not provided\n" unless exists $parsed{$field}; } croak($error_msg) if $error_msg; if (not exists $parsed{Description}) { $parsed{Description} = $parsed{"Short-Description"} } ($parsed{Path}, $parsed{Args}) = split(/\s+/,$parsed{Exec}); $parsed{Basename} = basename $parsed{Path}; for (@splits){ $parsed{$_} = [ split m/\s+/, $parsed{$_}||'' ]; } if ($parsed{"No-Auto"}) { $parsed{"Start-Levels"} = []; $parsed{"Stop-Levels"} = [1,2,3,4,5]; } else { $parsed{"Start-Levels"} = [2,3,4,5]; $parsed{"Stop-Levels"} = [1]; } if ($parsed{"Post-Stop"}) { push @{$parsed{"Stop-Levels"}}, 0, 6; } for (qw/Start-Levels Stop-Levels/) { @{$parsed{$_}} = sort @{$parsed{$_}}; } return %parsed; } sub parse { my ($args) = @_; if (ref $args ne 'HASH') { croak('hash reference expected'); } my $data; my %parsed; if (defined $args->{input}) { $data = $args->{input}; } elsif (my $fh = openhandle($args->{handle})) { $data = slurp_from_fh($fh); } elsif (defined (my $file = $args->{filename})) { open(my $handle, '<', $file) or die "Failed to open input file `$file': $!"; $data = slurp_from_fh($handle); $parsed{File} = $file; $parsed{Name} = basename($file,'.metainit'); } else { croak("no input given; you need to pass a `filename', " . "an opened `handle' or an `input' string"); } if (!defined $parsed{File}) { if (ref $args->{fields} ne 'HASH' || !exists $args->{fields}->{File} || !exists $args->{fields}->{Name}) { croak("parsing from handles or strings requires the `fields' option to " . "be set to a hash reference that defines both the `Name' and the " . "`File' field."); } } @parsed{keys %{ $args->{fields} }} = values %{ $args->{fields} }; # Defaults: $parsed{"Short-Description"} = $parsed{Name}; $parsed{"No-Auto"} = 0; $parsed{"Required-Start"} = '$local_fs $network $remote_fs'; $parsed{"Required-Stop"} = '$local_fs $network $remote_fs'; process_data($data, \%parsed); %parsed = fixup_results(%parsed); return \%parsed; } # Return a true value 1; # vim:sw=4:ts=4:expandtab metainit/_darcs/pristine/t/0000755000175000017500000000000010636001535014706 5ustar jojojojometainit/_darcs/pristine/t/00compile.t0000644000175000017500000000014310636001536016662 0ustar jojojojo#!perl use strict; use warnings; use Test::More tests => 1; BEGIN { use_ok('MetaInit::Parse'); } metainit/_darcs/pristine/t/exception.t0000644000175000017500000000206310636001536017073 0ustar jojojojo#!perl use strict; use warnings; use Test::More tests => 7; use Test::NoWarnings; use Test::Exception; use MetaInit::Parse; throws_ok(sub { MetaInit::Parse::parse('foo'); }, qr/hash reference expected/, 'needs hash ref'); throws_ok(sub { MetaInit::Parse::parse({}); }, qr/no input given/, 'needs input'); throws_ok(sub { MetaInit::Parse::parse({ filename => 'something that\'s unlikely to exist' }); }, qr/Failed to open input file/, 'non-existant file'); throws_ok(sub { MetaInit::Parse::parse({ input => 'foo' }); }, qr/parsing from handles or strings/, 'parsing from string without passing File and Name fields'); lives_ok(sub { MetaInit::Parse::parse({ input => 'Exec: /foo/bar', fields => { File => '', Name => '', } }); }, 'parsing from strign with File and Name fields set'); throws_ok(sub { MetaInit::Parse::parse({ input => 'foo: bar', fields => { File => '', Name => '', } }); }, qr/Mandatory field .* not provided/, 'mandatory fields missing'); metainit/_darcs/pristine/doc/0000755000175000017500000000000010635763526015226 5ustar jojojojometainit/_darcs/pristine/doc/converting.txt0000644000175000017500000000351610635763244020147 0ustar jojojojo== How to convert to metainit == (Without using dh_metainit) * Write the Metainit file. You can find examples in /usr/share/doc/metainit/examples * Make the package with the init script depend on metainit (If you require a feature that was introduced later, make the Depends versioned) * Make sure your package installs the metainit file to /etc/metainit. * Make sure your packge does not install any file to init.d. * Add code compareable to the following to your postinst script: =================================================================== /usr/sbin/update-metainit >/dev/null if [ -x "/etc/init.d/infon-server" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d infon-server start || exit $? else if [ -x /etc/init.d/infon-server ]; then /etc/init.d/infon-server start || exit $? fi fi fi =================================================================== * Add code compareable to the following to your prerm script: =================================================================== if [ -x "/etc/init.d/infon-server" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d infon-server stop || exit $? else /etc/init.d/infon-server stop || exit $? fi fi =================================================================== * Add code compareable to the following to your postrm script: =================================================================== if [ "$1" = "purge" -a -x /usr/sbin/update-metainit ] ; then /usr/sbin/update-metainit --remove infon-server --purge >/dev/null fi =================================================================== That should work. Of course, it’s easier to use dh_metainit: Then you just write the metainit file, add the dependency and dh_metainit will take care of the rest. metainit/_darcs/pristine/debian/0000755000175000017500000000000010707475747015710 5ustar jojojojometainit/_darcs/pristine/debian/dh-metainit.manpages0000644000175000017500000000001610636001052021574 0ustar jojojojodh_metainit.1 metainit/_darcs/pristine/debian/metainit.dirs0000644000175000017500000000001610634574050020364 0ustar jojojojo/etc/metainit metainit/_darcs/pristine/debian/metainit.docs0000644000175000017500000000000710635763432020360 0ustar jojojojodocs/* metainit/_darcs/pristine/debian/copyright0000644000175000017500000000213710636010676017631 0ustar jojojojoThis is metainit, written and maintained by Joachim Breitner The original source can always be found at: ftp://ftp.debian.org/dists/unstable/main/source/ Copyright © 2007 Joachim Breitner With invaluable contributions from: * Florian Ragwitz * Gunnar Wolf * Moritz Lenz * Urs Ganse This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License with the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. metainit/_darcs/pristine/debian/changelog0000644000175000017500000000134210707475702017551 0ustar jojojojometainit (0.0.4) UNRELEASED; urgency=low * add XS-Vcs-Browser header -- Joachim Breitner Wed, 24 Oct 2007 00:54:58 +0200 metainit (0.0.3) unstable; urgency=low * manpage with confusing names (Closes: #435149) * Manpage refers to a non existing document (Closes: #435148) -- Joachim Breitner Mon, 30 Jul 2007 15:45:31 +0200 metainit (0.0.2) unstable; urgency=low * Upload to unstable, to be able to convert the first package -- Joachim Breitner Sat, 23 Jun 2007 13:26:11 +0100 metainit (0.0.1) UNRELEASED; urgency=low * Initial release for testing, not yet for the archive. -- Joachim Breitner Tue, 19 Jun 2007 18:12:22 +0100 metainit/_darcs/pristine/debian/metainit.manpages0000644000175000017500000000002410636013625021213 0ustar jojojojo./update-metainit.1 metainit/_darcs/pristine/debian/rules0000644000175000017500000000202510636013665016750 0ustar jojojojo#! /usr/bin/make -f # -*- makefile -*- # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 build: pod2man debhelper/dh_metainit > dh_metainit.1 pod2man update-metainit.pod update-metainit.1 clean: dh_testdir dh_testroot rm -f dh_metainit.1 rm -f update-metainit.1 dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # install # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installdocs dh_installexamples dh_installchangelogs dh_install dh_installman dh_compress dh_fixperms dh_installdeb dh_perl dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep .PHONY: build clean binary-indep binary-arch binary install metainit/_darcs/pristine/debian/control0000644000175000017500000000175210707475736017316 0ustar jojojojoSource: metainit Section: admin Priority: optional Maintainer: Joachim Breitner Build-Depends: debhelper (>= 4.0.0) Standards-Version: 3.7.2 XS-Vcs-Darcs: http://darcs.nomeata.de/metainit XS-Vcs-Browser: http://darcs.nomeata.de/cgi-bin/darcsweb.cgi?r=metainit;a=summary Package: metainit Architecture: all Depends: ${perl:Depends} Description: Generates init scripts Metainit solves the problem of writing good init scripts. Instead of manually creating these important files, they are derived from a declaritive description in the metainit files in /etc/metainit. These files can be shipped with packages or created by the local administrator. Package: dh-metainit Architecture: all Depends: debhelper, ${perl:Depends} Description: Debhelper addon to install and register a metainit file This debhelper script should be used by package that ship an metainit file. It installs the metainit file in the right spot and add the required actions to the maintainer scripts. metainit/_darcs/pristine/debian/metainit.install0000644000175000017500000000016010634775546021106 0ustar jojojojoutils /usr/share/metainit/ translators /usr/share/metainit/ update-metainit /usr/sbin lib/* /usr/share/perl5 metainit/_darcs/pristine/debian/compat0000644000175000017500000000000210634571350017070 0ustar jojojojo5 metainit/_darcs/pristine/debian/dh-metainit.install0000644000175000017500000000013010635765272021470 0ustar jojojojodebhelper/dh_metainit /usr/bin debhelper/autoscripts/* /usr/share/debhelper/autoscripts metainit/_darcs/pristine/debian/metainit.examples0000644000175000017500000000001310635763363021246 0ustar jojojojoexamples/* metainit/_darcs/pristine/local-test-bash-source0000644000175000017500000000024010636730273020652 0ustar jojojojo# Source this file using # . local-test-bash-source # to run the metainit scripts locally. export METAINIT_PREFIX="$PWD" export PERL5LIB="$PWD/lib:$PER5LIB" metainit/_darcs/pristine/usr/0000755000175000017500000000000010634573731015266 5ustar jojojojometainit/_darcs/pristine/usr/sbin/0000755000175000017500000000000010634602206016207 5ustar jojojojometainit/_darcs/pristine/usr/sbin/update-rc.d0000644000175000017500000001442210634602176020251 0ustar jojojojo#! /usr/bin/perl # # update-rc.d Update the links in /etc/rc[0-9S].d/ # use strict; use warnings; # This is a locally modified version of /usr/sbin/update-rc.d to work in the local # directory, to use for testing purposes. my $initd = "$ENV{PWD}/etc/init.d"; my $etcd = "$ENV{PWD}/etc/rc"; my $notreally = 0; # Only parse the LSB headers when this flag exist. It is to be used # while we test this new feature, and should be removed when we are # confident that LSB headers are correct. [pere 2006-09-06] my $lsbparseflag = "/etc/update-rc.d-lsbparse"; # Print usage message and die. sub usage { print STDERR "update-rc.d: error: @_\n" if ($#_ >= 0); print STDERR < remove update-rc.d [-n] defaults [NN | sNN kNN] update-rc.d [-n] start|stop NN runlvl [runlvl] [...] . -n: not really -f: force EOF exit (1); } # Check out options. my $force; while($#ARGV >= 0 && ($_ = $ARGV[0]) =~ /^-/) { shift @ARGV; if (/^-n$/) { $notreally++; next } if (/^-f$/) { $force++; next } if (/^-h|--help$/) { &usage; } &usage("unknown option"); } # Action. &usage() if ($#ARGV < 1); my $bn = shift @ARGV; if ($ARGV[0] ne 'remove') { if (! -f "$initd/$bn") { print STDERR "update-rc.d: $initd/$bn: file does not exist\n"; exit (1); } } elsif (-f "$initd/$bn") { if (!$force) { printf STDERR "update-rc.d: $initd/$bn exists during rc.d purge (use -f to force)\n"; exit (1); } } my @startlinks; my @stoplinks; $_ = $ARGV[0]; if (/^remove$/) { &checklinks ("remove"); } elsif (/^defaults$/) { &defaults; &makelinks } elsif (/^(start|stop)$/) { &startstop; &makelinks; } else { &usage; } exit (0); # Check if there are links in /etc/rc[0-9S].d/ # Remove if the first argument is "remove" and the links # point to $bn. sub is_link () { my ($op, $fn, $bn) = @_; if (! -l $fn) { print STDERR "update-rc.d: warning: $fn is not a symbolic link\n"; return 0; } else { my $linkdst = readlink ($fn); if (! defined $linkdst) { die ("update-rc.d: error reading symbolic link: $!\n"); } if (($linkdst ne "../init.d/$bn") && ($linkdst ne "$initd/$bn")) { print STDERR "update-rc.d: warning: $fn is not a link to ../init.d/$bn or $initd/$bn\n"; return 0; } } return 1; } sub checklinks { my ($i, $found, $fn, $islnk); print " Removing any system startup links for $initd/$bn ...\n" if (defined $_[0] && $_[0] eq 'remove'); $found = 0; foreach $i (0..9, 'S') { unless (chdir ("$etcd$i.d")) { next if ($i =~ m/^[789S]$/); die("update-rc.d: chdir $etcd$i.d: $!\n"); } opendir(DIR, "."); foreach $_ (readdir(DIR)) { next unless (/^[SK]\d\d$bn$/); $fn = "$etcd$i.d/$_"; $found = 1; $islnk = &is_link ($_[0], $fn, $bn); next unless (defined $_[0] and $_[0] eq 'remove'); if (! $islnk) { print " $fn is not a link to ../init.d/$bn; not removing\n"; next; } print " $etcd$i.d/$_\n"; next if ($notreally); unlink ("$etcd$i.d/$_") || die("update-rc.d: unlink: $!\n"); } closedir(DIR); } $found; } sub parse_lsb_header { my $initdscript = shift; my %lsbinfo; if (-e $lsbparseflag) { my $lsbfound = 0; my $lsbheaders = "Provides|Default-Start|Default-Stop"; open(INIT, "<$initdscript") || die "error: unable to read $initdscript"; while () { chomp; $lsbfound = 1 if (m/^\#\#\# BEGIN INIT INFO$/); last if (m/\#\#\# END INIT INFO$/); if (m/^\# (Default-Start|Default-stop):\s*(\S?.*)$/i) { $lsbinfo{lc($1)} = $2; } } close(INIT); } return %lsbinfo; } # Process the arguments after the "defaults" keyword. sub defaults { my ($start, $stop) = (20, 20); &usage ("defaults takes only one or two codenumbers") if ($#ARGV > 2); $start = $stop = $ARGV[1] if ($#ARGV >= 1); $stop = $ARGV[2] if ($#ARGV >= 2); &usage ("codenumber must be a number between 0 and 99") if ($start !~ /^\d\d?$/ || $stop !~ /^\d\d?$/); $start = sprintf("%02d", $start); $stop = sprintf("%02d", $stop); my %lsbinfo = parse_lsb_header("$initd/$bn"); if (exists $lsbinfo{'default-stop'}) { for my $level (split(/\s+/, $lsbinfo{'default-stop'})) { $level = 99 if ($level eq 'S'); $stoplinks[$level] = "K$stop"; } } else { $stoplinks[0] = $stoplinks[1] = $stoplinks[6] = "K$stop"; } if (exists $lsbinfo{'default-start'}) { for my $level (split(/\s+/, $lsbinfo{'default-start'})) { $level = 99 if ($level eq 'S'); $startlinks[$level] = "S$start"; } } else { $startlinks[2] = $startlinks[3] = $startlinks[4] = $startlinks[5] = "S$start"; } 1; } # Process the arguments after the start or stop keyword. sub startstop { my($letter, $NN, $level); while ($#ARGV >= 0) { if ($ARGV[0] eq 'start') { $letter = 'S'; } elsif ($ARGV[0] eq 'stop') { $letter = 'K' } else { &usage("expected start|stop"); } if ($ARGV[1] !~ /^\d\d?$/) { &usage("expected NN after $ARGV[0]"); } $NN = sprintf("%02d", $ARGV[1]); shift @ARGV; shift @ARGV; $level = shift @ARGV; do { if ($level !~ m/^[0-9S]$/) { &usage( "expected runlevel [0-9S] (did you forget \".\" ?)"); } if (! -d "$etcd$level.d") { print STDERR "update-rc.d: $etcd$level.d: no such directory\n"; exit(1); } $level = 99 if ($level eq 'S'); $startlinks[$level] = "$letter$NN" if ($letter eq 'S'); $stoplinks[$level] = "$letter$NN" if ($letter eq 'K'); } while (($level = shift @ARGV) ne '.'); &usage("action with list of runlevels not terminated by \`.'") if ($level ne '.'); } 1; } # Create the links. sub makelinks { my($t, $i); my @links; if (&checklinks) { print " System startup links for $initd/$bn already exist.\n"; exit (0); } print " Adding system startup for $initd/$bn ...\n"; # nice unreadable perl mess :) for($t = 0; $t < 2; $t++) { @links = $t ? @startlinks : @stoplinks; for($i = 0; $i <= $#links; $i++) { my $lvl = $i; $lvl = 'S' if ($i == 99); next if (!defined $links[$i] or $links[$i] eq ''); print " $etcd$lvl.d/$links[$i]$bn -> ../init.d/$bn\n"; next if ($notreally); symlink("../init.d/$bn", "$etcd$lvl.d/$links[$i]$bn") || die("update-rc.d: symlink: $!\n"); } } 1; } metainit/_darcs/pristine/translators/0000755000175000017500000000000010636000034017010 5ustar jojojojometainit/_darcs/pristine/translators/sysvinit0000644000175000017500000000722710635772326020656 0ustar jojojojo#!/usr/bin/perl use strict; use warnings; use MetaInit::Parse; my $prefix = ""; $prefix = $ENV{METAINIT_PREFIX} if $ENV{METAINIT_PREFIX}; my $metainit_dir = "$prefix/etc/metainit"; my $etc = "$prefix/etc"; my $updatercd = "$prefix/usr/sbin/update-rc.d"; my $metainit_base = "$prefix/usr/share/metainit"; $metainit_base = $ENV{METAINIT_PREFIX} if $ENV{METAINIT_PREFIX}; # # Rough plan of operation: # (Maybe: # Check all init files, find all generated ones, see if the metainit # file is missing and delete them then) # Check all metainit files, whether the init.d file is out of date. # If the init.d file was created, find a suitable rc2.d/ number and run update-rc. # use Getopt::Long; my $remove = ''; my $purge = 0; GetOptions( 'purge' => \$purge, 'remove-metainit=s' => \$remove ); if ($remove) { # Operation: Remove all geranted files for the given metainit name remove($remove, $purge) } else { if ($purge) { die "--purge only useful in conjunction with --remove.\n"; exit 1; } # Operation: Rebuild everything #check_orphaned_initscripts() my %metainits = read_metainits(); my @generated = (); foreach my $metainit (values %metainits) { my $created = regenerate_initscript($metainit); push @generated, $metainit->{Name} if $created; } my %arrangement = (); open(ARRANGE, '-|',"$metainit_base/utils/arrange-sysvinit",@generated) or die $!; while () { if (/^([\w\.-]+) (\d\d)$/){ $arrangement{$1} = $2; } else { die "Can't parse $_"; } } close ARRANGE; while (my ($initname,$num) = each %arrangement) { my %data = %{$metainits{$initname}}; system($updatercd, $initname, @{$data{"Start-Levels"}} ? ("start", $num, @{$data{"Start-Levels"}}, ".") : (), @{$data{"Stop-Levels"}} ? ("stop", $num, @{$data{"Stop-Levels"}}, ".") : () ); } } sub read_metainits{ my %metainits; for my $metainit_file (<$metainit_dir/*.metainit>) { my $parsed = MetaInit::Parse::parse({ filename => $metainit_file }); $metainits{$parsed->{Name}} = $parsed; } return %metainits; } sub regenerate_initscript { my ($metainit) = @_; my $initscript = init_script_file($metainit); my $new = not -e $initscript; if (not $new) { if (not may_modify($initscript)) { warn "Not overriding user-modified init script $initscript.\n"; return; } } else { # Here me might want to check if the file is up-to-date. # For now, we just override it always. } system("$metainit_base/utils/create-sysvinit-file", $metainit->{File}, $initscript); return $new; } sub may_modify { my $initscript = shift; if (-e $initscript) { return 0 if not -w $initscript; my $can_touch = 0; open INIT, '<', $initscript or die $!; while () { if (/DO NOT EDIT THIS FILE/) { $can_touch = 1; last; } } close INIT; return $can_touch; } else { return 1; } } sub init_script_file { my ($metainit) = @_; return init_script_filename($metainit->{Name}); } sub init_script_filename { my ($initname) = @_; return sprintf "%s/init.d/%s", $etc, $initname; } sub remove { my $initname = shift; my $purge = shift; # It seems that --remove without --purge is not good, because possible user # configuration in the form of rc syslinks will not be presered. We rather # leave the generated init script around until purge then. So do not call # --remove in postrm if not purging, and do call --remove --purge when purging. my $initscript = init_script_filename($initname); if (may_modify($initscript) || $purge) { warn "Removing init script $initscript\n"; unlink $initscript or warn $! if -e $initscript; system($updatercd, $initname, "remove"); } else { warn "Init script $initscript is modified, not removing.\n"; } } metainit/_darcs/patches/0000755000175000017500000000000010763540736014251 5ustar jojojojometainit/_darcs/patches/20070618202028-23c07-5a38a53ce7328f91e24f9aab81f3c8431acad363.gz0000644000000000000000000000110210635564471024453 0ustar rootrootRj0}bM˗ZHv.޺zȮDEwGEO3is\BdM ӓe<;T8Cg䌫t٤}W{.6,+ݞ&.\@ߋ@Á~*0ɅjE)2 ɍ\SF -锪RZ[XF]PEҮgq#z4@fv.me'JjWźtĵLQt:XysQ4ssqymQGha^҄p[$OhCM)'#DyTfص&rG)kzm҂MWKؘg2/"|?g~UXE?metainit/_darcs/patches/20070619162542-23c07-77819568cfdd676ab91e707337d52ebaf8d6618b.gz0000644000175000017500000000022110636001607024337 0ustar jojojojoJ/KUHOK-J,IMQHɈM-I,3OLUp*J,*QMqȂ&ARR - ͌LMb2JSR2JsR -t9rtӐ_ metainit/_darcs/patches/20070612180424-23c07-7c69a7a31023584d0dd22bdd44ed4cd721f5e16e.gz0000644000175000017500000000025610633560050024426 0ustar jojojojom 0E|ŚbTD]bJMR"p^h #Z'+5΂pQSh`-hvo"FiN)KW4czRw̍ŤI CDSSaoPvC p֏ēfmetainit/_darcs/patches/20070616165929-23c07-366fcd46dc4da6ee3e2fafbc6874ceccf1e47571.gz0000644000175000017500000000036110635013361025051 0ustar jojojojoMO0 ˯[[`C !2w5k*q|{ǏG[])EGbcC%Hٓe An: i N#v?i="1L}8 83Xk V䰊Hi be^>e'dKW&LC{]metainit/_darcs/patches/20070619161129-23c07-01b4cc8b18a6957da6b8ef467359adec167bb879.gz0000644000175000017500000000314110636000070024461 0ustar jojojojoWmsH B] CLi\6N?$KpԻcRI´wchGZrp̀{#DC:w\(wKpW^莔;pPo= 7p}xrWUm{-&7l:nm[m` XX mTn se-PW|`K99ЮiflX\=/ $MnDgڗ!]ݏ1C=c} (D&s(#@?> aYw7"ގ-ui1~??m5Xbwc"m1#kX4:o|p g0R>'g%(jLdKh4)<8ϡXk4Xe fV`~ ,|9` 6}_*bh"/,}et}KLe'cj$b'Շ-![[ m}r[񴗡wV0< GYCQWgZ-+v>m_:'BFC=:8yM)z$MtrE /pnF]CnЮ _5 |sl$'! #hD mhy㭈>. }%@s9%; c.ChA Zޥ#p#:PYMG:atL$yA^77ql8FLn d2Fx! R-n*7I4捶v2?БzeK L)k _YBn;ldĈ-F` 4FcsAcKܦ/yJgQ=) N K9'Nt*odMhiGPjgQq†U=q1Cʮq`Geoㆼ^/W*R(VJohrs!8b[RQC8ٔD@D B J\ Q =S#!%Y>ඳz?"};XûzxEgpO:3ڄ\kk5"= CݩcZeLLԱ218KyW GrEKXTc`}!;Ok39qUoJ2%yJd|.\ ѽU5p\X22I*}JDZE4‰j5n+6|nQRr JeԠXj]D F8^:"3!Fc'L鲕idbU`60V%s'{WR E"H3+)uW~*G\l%ZeG,wǭiaZxd@OVyw8s)`zciaGq&T.w>Xl%n`:dt<7B?uKm3mO7_ƩYozometainit/_darcs/patches/20070619145726-37dd1-3d3b4f810fc23d6863d2179b1be518552cf698dc.gz0000644000175000017500000000043010635767422024421 0ustar jojojojoOK@O-J? F[<  UDkt)ݍZQҽ웙 (  NK: JI^IE8Jx;*\ެ9T0Lyt]͒x r (ZQn.KGg'Ȱ˼ ]5%%n|Ն '`9rfU3mRۭQZž?'Ѻ}1Lmetainit/_darcs/patches/pending0000644000175000017500000000000410763540736015612 0ustar jojojojo{ } metainit/_darcs/patches/20070612185342-23c07-46af509ce682ee93e7a01a305580312a841edf7d.gz0000644000175000017500000000031110633565666024313 0ustar jojojojo9 @FC X2HV캻]-Ϩr,,bJ,Y4@ 0#7lJplz3p{BEҲ8e#!9t\"-^kTO%20@Mu{+G^J~gz\\ITmetainit/_darcs/patches/20070616162833-c9690-f28b755ffa5980ca3907f1a2cad864d17be90a7f.gz0000644000175000017500000000013110635007661024553 0ustar jojojojovq q r p qJI,J.MI-(2200703B# cXjĔ̜T=}4n>\\䂗Tmetainit/_darcs/patches/20070618201855-23c07-7eba384ece5d43f42abe6d0765883690bc46d4e5.gz0000644000000000000000000000040610635564307024506 0ustar rootrootMO@+P [L !x2^=,tJGSݏ!wTM {}vgwu7Ex$'GM| Z}@CT`pC.j-4%x.$ZU{ШME c4Њۗ'o<*p9Nt6,r؋+ƾs+co1%&HN=}ӣzp#j*b[>fE at0\<= dtOd.C A˳ metainit/_darcs/patches/20070618194256-23c07-8f07a74fbe902caf4a40ce9679731625bde76624.gz0000644000175000017500000000031610635560102024330 0ustar jojojojou] 0F+xUL-/**20*$+bD=ûny~E/SӔhPDT%D\ƀ€RI3cn T$d苭jtv赚n([s_x` Jf.)POf UhʾY^;0metainit/_darcs/patches/20070614101356-23c07-2ba9f9e01ed2955b64f75c09f3d308ef2c2bf856.gz0000644000175000017500000000033010634212346024451 0ustar jojojojo}AK0{~o[6j׃t=x;ncӤd"wT {#@nK8"Rk$¿"1;ù&:Xdl/_~r׋iU]T+}+}V𡺽QkaFxz61Wh68Ԭ/i㞬1qjgLb^S::H"/@"YgS}"$metainit/_darcs/patches/20070621191027-23c07-41bb2cf1164a2be022729bc4486294e10a13c97e.gz0000644000175000017500000000033010636546444024203 0ustar jojojojomJ1E Jb&YXvtμtɐjgqj0w5<rḽ c"wx)n86X>}5;w95e*Et!9_>>c ?R1wmetainit/_darcs/patches/20070613185303-fc6be-e7b07c5ed793f27c44cb3edc3e235ff3a572e025.gz0000644000175000017500000000051410634045531024752 0ustar jojojojo]O0Fx3g"~EW`"ƐlneJm{EA!%|f"9’JFUłЊ H֊^)*Qn楌[v}Oؒ)x7DUkdiw2 :Ĺ44:)-M92JZ3d~$q]PIzݬ 4 аkM0%΅O9GM8+=>qlUhUq'x4u5-cW'J['LY7eh6?.9FN=IE;m@metainit/_darcs/patches/20070614100842-23c07-7451366c1325ddc8d7ca0e004a70d4c5b9bfe589.gz0000644000175000017500000000456610634211653024366 0ustar jojojojoXSHlFxr-6Wp4ƳȒO*pv<4F=uOORDP,G]XiP֯i. eBhj7H??8|9z1z?[A-d,?pZU} F[{;0(l0`-W`X&W9Yx>рٶ\@^d2,:( e"^ycW"Ь'i oݐ%A+q"DR$(sX%o2/'R\%ZO"a!D$|qD\X_1z2 !a,d$5U_gQs 7|9S`e{ӦIܫ̃K+7)I'߷Zk>S ,4@.o\13n2}3^2?̓\$JkWmܣwH#ʸ|2[d2{o^Yq-+k 3@ZFp+CʼDpqR?"/ExiY@.d}1f`0~moO{=C7^`۴v>ua7p8\^2ik{{cD*&7,o{׊ja HD9 i;lcy`Bm/j*l2ŐOJ:᳢PQF9ӈq=ns"iMZu%i!*2DnX]ԇuӅ C,kWÐr1~0ʵb@SU}On/& r1<[WB<~] )^$`ӧDcpR "qE}b8e4"úd/oc?W"uJHa(mQo麋t3k丆> `}1)G YXJ&ItcWM٦"*< RDᩀ_Y=Ue*o}}j W?{`Ի}G:ٜ7#S(N¸AL"{ɕje0H t_^:ʵۢ'G];m.Zl:%- DFAvTm᱇2 \%L Wi FI(I"Ai^XE/'i*FilM# "}U{FvC+lb{loڽҪJ2Ȁ'`x!0RpWK h_w]noi1VІqݸYn^qzjRِ\۷? LSd{wjݴ0kFo#~Pg\O)] wD푫!K2 ؁`0 5sX$#v\A<\?x 7qX~|Hi%p>szOu~{Թc߅]c(2$԰atsE5ϴ!\4lFsDfSPKř*@[RS<4)e89BƫǰoS/x0 hV#|~`ԁUq30ŵsȅDMUVk.;G)WM0܏~qϒ dy+I^$n X&]x;K:G9Wc\i7>Ye{>SPTϪz޶"Q ˞PTM2|QeCN'9W=X+TL? ˴ Å _4ܨ'۽=^P[ fM inL(=9t*Lʭz$/R9t%B)\OV l v 4#aJ5ڔSjaIѬ:!j@vѸhY5֣q[5<URzS`#'#IKj/ES?udzr^dZKCѩyܸpv ]P4m+WBj`t}Sf)өڽSH-G諞4LcOWH .v$.ξڥBTxC3%'gfEbF[1t[jJhLRZZcpm metainit/_darcs/patches/20070619171245-23c07-86c337b3893962af91c541deb016e282c28756c8.gz0000644000175000017500000000036410636007220024107 0ustar jojojojo1O0& 4€Dg66%y$RP*~}xS^PY5z>P`+-d{J66eg]ޏ8q^*MRsuzed"ɀٟ}aG!7V e (jaM';d1pw5~~vGjq/j bi #I15y"X3A/4O:RGQ_xU-8}cnTACxdBwӸ1Drx0 =s 8;JfKkuH` S9<,,DJy!xpf_ ^&E5D))Rbuc:u:~ `!i(7;:s4 K}9%O$jsDM eDNqӎֶ}v,R\>sy V>WUSM I$H2xXJfsj7S^^1>9٤*Z&i4V9w^tw`;ݢ SI;kAVB\TE?Bvl~@ABT$/쪥 metainit/_darcs/patches/20070619142518-23c07-5eeaf0be5350cdb29f59f72d2b70322a9418ddc9.gz0000644000175000017500000000272410635763526024552 0ustar jojojojoXn6m=YI%ڲ^]RZ] (ZZ-֒IvHJȹ-G<~;ޟ0I>aL*.r(R0aZ3 {0G E 1&L.5OMy"M!)@="Ms91;"| HLSs S?E _;Y2<^dO%T2|V1 :wV  BC 1T{:3t/_%S2K P .#CJqj'֨j,_G4-Wq\iʪfcz=6;h&\le*N81[V`č\H8BicJOl-}~v,'N5G$# ёG\FTP~,ߚEfAFf|QI'jTI(ʸV52r-3b&irLL>fS!b,6 ,oᩙp (ų@!! bjid@AAg8<0"Һe .ޚH"֒H]|]%Mx+mq/f^^X| ŽES(;g c*j«;Yy3"n uXNW+ 3@Wi_"$Veb޷MusV^;)_6۞+ĵYCUiI+ vCUY":.Ɗ4|f57`'c64߰]zo4zGmM2]Zr_m$?lKq&a߷yǧ,fܼ3G}f;Y ` ¿e!ûo'?C)g, P;LZ=G$7WC1̋7@T#of Ga? = Dʹ0M2adK( NRF'6WBF,wnArMiM utPq}+~'-9^ow:qb)Pu%%FА8;Ej4p^2AA]hڈv|l& VOcTkdW׻Np= ܫm{'f'7{Zg(7Gu`VfAQMxU g[ۖUVȏLz)/9F[W=~`h j&x_nM: ZEv$~Q[sW(Bλ;@)GKH#yȜrNsƉ?ň݋ 繆)XrV KL!N+r\ ؝&g[? `waW (7mǹqӹju>J)زc)[GA$(Q` ϢUך#BSqpԖ"#Pބ } v X-ZM#?a}8~ۗ0[T4mhdYD*uAyvN2mR4V [D>H]mZYfL41̇fJ%}B!;Xq[2 )νg^=!Ms wb?O|յBimetainit/_darcs/patches/20070619150356-37dd1-43866303dd5bdde46c2a2292fc6d1e2f0d23fa47.gz0000644000175000017500000000034110635770565024535 0ustar jojojojoAK@+D&۔F"x!S3IngƢ6=Ǽma:aS@o>Xԃuސ_),fJk]oKXoVQ(JkGzgaJW t4β?I`O7B[DBeNG d ,lHZ9GJi7GH~|R>OS'metainit/_darcs/patches/20070619144611-23c07-46ada8bb6d5160eda28d0c9b14980e7a6252ba07.gz0000644000175000017500000000053310635766064024444 0ustar jojojojomOO0 Sie튦MLg8qJeIIqN~vޟ<ʈxQ,rR=Rv#+ Fd>7t: ]5‚JgwH^SEgI#%VhU`#M .E'S(=U]7TYȆ4Vب0EEoaoZ62U ?x*=4C*tA?5y(fRp!ྖ:iwq@.a6|>+벎u-=fg-b'حPjmetainit/_darcs/patches/20070612175401-23c07-0f5acfd8e913b4b94a40ba5e6aebb996b20c65a0.gz0000644000175000017500000000017610633556671024661 0ustar jojojojoJKMUH-QL*J,OLUp*J,K-RMqȂ&ARR MM crR}SK=2KS r0&W-{metainit/_darcs/patches/20070616103940-23c07-d238d907ca6d7124f081267682b0cc6789f52364.gz0000644000175000017500000000056510634736757024046 0ustar jojojojoQ[O0}~'!RƆ 1`1ԐWZvd&>4iw9;9,>]$(g^@#*F "LÛ6[aynY=sٱ.]> f6LXq!MeTA%P0){\eg(_q[PZP&'RSճsА@}5)eitus4ԅqwyk.KU|7::w^R԰ތqUȨ҂ƂAeA} D.J| W~a|&Oz͔{!$Ǝ,8riEt$yɹܔ#3GF$GE+ۇv'Spo/],,metainit/_darcs/patches/20070615224741-cfe6b-663ad94cedc18e03b93db3c1f32006d4f8fec09e.gz0000644000175000017500000000276410634614752025050 0ustar jojojojoVsF}ؖB ĐLMtL"k$НbNdrJI踻޾uP$2*HCʥg"UiYlw!r#E~fs|~ g?t{v?^T7wbuY)8]~S""ܥ7}56!q rU:C[j;^ƼEBaF^LE",0djYiFL&5U2dSҧK㐜ne({-P5#a\N[ %/hs"*aw!t٠O7G2YMwM8 ѫvn$O:| Vą4^SJB⁎ewiR+rG\yd_ cId Q{MTNY.o. PĔWlhNc6\ z9WqHZمӹBYafC|ST2u¼.OD9nq8l4(ؙA|n5 gSZR @A\]/UF@%^Ybbꓭfܣ5]A'V".I؈^#F9` PϑCN=8@l EK{nLVc0Lw*+[24 f2)wyM&UqmD?@|e񩴤ޥ\!ע`EYEHK*ʞAFtʨ2 ۅ%"vr.b)n̘҉bk._Uvx"g.EKePy^qu$? mY]W)ӨVչ)<7JtVHl5'\m˃㷣Qr^GtvpBǧiptugkE..SoV %&Uh>KUVV-Aj EZ5p}_ۮm' n9'Usk);7YRk3A&8Sp.5Cg"AN,Y|}4_·}HϵG–NtX̱Z^ng*6L" /@kqk4(1_P V=t4WV Bv/vf9U{eIdmt oi.yhx@cwxvWie~dm7YO& o^֫/=>.no;^2M|R %H%5UZjiIk7rѢc7\'cѣ:406< GGdp}Bt_M&&[vxc2lug_UT mg&<ШYTj|ˉ}Y71۵!^O|;pbL6ݧk,ۜ&o?9rX\yn}T㇌1xx metainit/_darcs/patches/20070619172626-23c07-8d0874999fc12c066426b46502e994da10aaecae.gz0000644000175000017500000000036710636010716024324 0ustar jojojojoJ0Ei;IK[DAE}qdH_Dwt廜w˭ZFԨ<{L8x2ljfytt٤RP{UEZS =!ut4Zwm`:p Dh\-lpg$BM8ꖢ j 2fCT)LsS/W+i4 M92dU&b+7a]metainit/_darcs/patches/20070612183305-a9d57-f8f819c6d74a4ce58b71da477d2eea51129c2072.gz0000644000175000017500000000077010633563501024471 0ustar jojojojoSn@|}Ƹ5hHUB!H}I| >3%{ql0NJ`vfggwϷCB\EX}҅BюRHXXE_%*ꁚ9mm{7r&C>sL0p>2`<83eV$;!d \`GF؃G|RFMXD4\ Pa!$FG#H\i3h2(VSfU`:V8h#,"4.YA3W!N5G?$i@# U?qUyenj 5[t%z=\Fd'fW`p1@[{#Ix }ҝ}^NIo-b$^M1x)5;Fk;lRQstnr9KE^3-"KHT=6]a\NOmetainit/_darcs/patches/20070614101254-23c07-8ad631237f29fd9fe50eda83a6ba682d4b80f543.gz0000644000175000017500000000026010634212247024442 0ustar jojojojoU;0F-5G 8`jۄ*`][F`&ZܔYm='=* idޡ#y[Qud%U$QTlilVɎANN|n:;}Gmetainit/_darcs/patches/20070623122701-23c07-a698ed58f16e6223c129435b7e6912df05e4cbec.gz0000644000175000017500000000041110637210626024365 0ustar jojojojouAK@sԤIw7BR\x$^dm[6EnӪۼa7 N[ӷ9;D$ ЛSpTԺōc>sْnG;οy*!bRT'uoH%̸T 2[8;=!ˮWzW)ޮD'urAXK%#g z5{p_36u;*T"q mliqI*Ų7!ә̤D$CȏokXmetainit/_darcs/patches/20070613100625-23c07-9220a82e712a54eeb110d1b207624ea138c07b4a.gz0000644000175000017500000000230710633740673024162 0ustar jojojojoVn7}b,+dU$m"["Elנw.!EΐZ$̙ yya`M'=4DZdbBNsa%p2m!|zz:2__a9`7`P$_- ~ܓ+!\%Zg1"yee~kXYE¡?`Z3Jo,/rywF 7zp+ :wp0;dZ"$3)O?1mJWLe&cvKīp6j/,9I3QKn| îJnJߡ*d)I䄣^!) o^y,wnQ:y)2/'¯)n`m>#T@$@9UtT1;~= 4\ixĪ+mkuީu,@$odׂؘȬdm6hy\;Ny~XAK2,sy')ڲ(a,j~] VەL4D#P'S5]M|hҜTLáiE *z)8OK˰2-hV`SQ5f*netȘ"Wd[%ngVȕ{'t?XDopoҪ hhKݰ sCK6B'3 !++iXr3#8s!qw(xɟx/>ɣfAIZG J94^=XWu< 71a[tCsc4o.G@\"H8[.tƉUZ#^ :]ŭtboT8I^nƯ6нSU֩DiZ8y|M̊=3Blv|`#gumn96l%Jl @jyd/ADϯ)aAp殟[N*\R<&mbFNJw+mK=j96RowR禣STؼ]t,ؤu+]DG9}kz9p5oύl@G2XҎizmJOXY Dǧ8cIXwVіd, yj|6; ( , 3*sg4հH FdzE{3Ag`vGKLRU dl: >HA[I*S`kzΒ`b  $;K ^Z?qt[c. lBs@n8V/WZFjkK|Tڪ2Z],uaO:K8I芓Z]G*% IRe YNGM)s>+l:8!ˋ޾|uxA E_ZBJw9ȾJ"Bq08?nz$$Ϙiݍc"Q !BC WShLJn67 < py^!Fp ZfȤgôd!M:WqHL-ćn*9ɒx:"D,ꭢZ4}-!+2 qA)ofBӉsiPjfP TE#T& |xy~^T`$D>+`U Hk搻kF7e^Üa+wFeGpxzZ8?9~GX=]}ڛХ hB~b /ѝ.y2yz\ _w1_+tSFף[Vd6Fhi#.#B\o܌?8,(|Eأ33zyW j|<*[t-*nٖMsYP(Q|w2ImYPX,]:%< UlCIV]١Kd|ΌDIo?w?{$metainit/_darcs/patches/20070619134048-37dd1-44244f595f826bcc7f163b7be7a3991d1beab911.gz0000644000175000017500000000037010635766740024477 0ustar jojojojoMK@{~PJ"xPW0NN4'杗AL";VCЋI+Xƅ@0n'a!4萣'5 JD#@[=jWlFpcb4ϗ,vQ;OH3UL lQwP,ϣHٹ[$qy@oeÊԻ`49qP..?ڲ}Y"[metainit/_darcs/patches/20070613112140-23c07-8aa544f0e856dc81bf153dac975b137143de2c4f.gz0000644000000000000000000000044510633751504024445 0ustar rootrootmN0w?/m@ Ȋ1Ne;I,%t!;kŀ菊"#ic(C+:xc%mߦr˥b궾u}SK{GyOgR,"$o6 B^S . $/O X!=.s #-[LfoDl']ƨ N:` e͸lz,ɘϑcK0>NbڒB O?2bayҞe4C)Jqmetainit/_darcs/patches/20070615200324-23c07-a81e0d6ad277d3b256e5cdedaefe300f574919cf.gz0000644000175000017500000000025510634570227024664 0ustar jojojojo-=0Eg+^RDc:TZ)` {s:J2h Ҋ `GJb} 81WzE 1̺>hxIWJo%Z4y]2c xuFփm5^8MqeP+rèCgؗԵmetainit/_darcs/patches/20070619143144-37dd1-61103514e5b57cca8c1529e56c8259c70e800adb.gz0000644000175000017500000000174310635766740024322 0ustar jojojojoVr6}bCɺRQFR'p!Dr> t+)dA$x6\gb_pS IƥQLi KPJ^s :䰶r >ڒ #FsǑC e_L~ %j:ɔQ=_B*&gO:t"IylcRy?Z}ry^k[AgڅW 0 4H8%2. D|/wAEԒ osWP˂Fvn*EܮN^n#B~)jMG"C2tjr82Ys&a~a"26!v[ j:*uӉ]8dIF)t)4g3m;;6rJȫlaVJz@6=9.޹e:suܐ;<^s)_kS!趐I@I3/+*Vl~}ˌ0Um) HEG/.I3"ꢝvn8/-˼VQ; eW}pnͤĒ{Q_({A3,e ͋. Sjyo;qQ:O#d3W*jn CveDliQ%Cx`gbx,’6bxt()!88 vF̌4z*ѡLJfRolC[ v'y)8~[˼_۸t=}ZyFCPbZڶ*Y metainit/_darcs/patches/20070619212752-37dd1-308710dbef0e20750c6441b8462e5c3260f6994e.gz0000644000175000017500000000041610636045235024153 0ustar jojojojo_k0şͧ X?1a2qȌam%Vݗ0ܓ9 #,'}0T蓧L* 0p&OqeE_`p1(f ɮ*>2 ^B+~՘Dߊ>Pد^>@r$7Ļ*Ҝo5psCi|۽ϫtV R ! CB'YIYuu}ICu7Gmetainit/_darcs/patches/20070619213655-23c07-a0123a87aae0fac007e6622f8720be832cff3d10.gz0000644000175000017500000000037010636046200024412 0ustar jojojojovI-NVx6I!8#D-,(OLUp*J,K-RMqȂ&ARR - LMc2Js2}SK=2KS r MMt@$Rdy-\e\DjUЫTaFF\F2/17֚Km֗d'&Weݡ` t2fX)MK-V}MX%@i-metainit/_darcs/patches/20070619174954-23c07-5b55a4577b6c38be0add52913b05dfa861062873.gz0000644000175000017500000000134510636013522024236 0ustar jojojojo}TaO08IiCHFNӄė##iUM;;ive{y~S&Kbp@i.93hxř(V05 &M9rqt|<8=8п_]//+=`+{RA~u?1. H޾<|Ͽʐ>s w gS oXdrpvG{f]wR`KrWH N~8ڲ%l^$RWdO{3E:T́XQA$emD |fKϏNg?Qٓ-떪 u/ N$WqMy?#Bmetainit/_darcs/patches/20070619174936-23c07-0eb121d313fc6a8d15879aff1d9dd45b9eeb66c3.gz0000644000175000017500000000056010636013462024626 0ustar jojojojouRMk1hOUE)[l2IfI"쪔}d$$QqE)`dg2)CcOp^ၦ^o<MGbVLf/8dƯa0TC>PY~s>ʚ2?8L4oF [hgbu΂<,9@d'Frc3+&bLobd:UuҒ^Nvl Vݲ/>&B9v* 1Kc)405,;@9*MܶږrRR 16A V%cgRuMlm*To-+ډWL+r_hmetainit/_darcs/patches/20070614093042-23c07-7bed998b464b9e1277bf28519e6101071c2e3f8d.gz0000644000175000017500000000043710634205310024236 0ustar jojojojomJ0E+GE+,N\iS&""B{=/ 6֫@M4+k!qkH8EWc?Nަqz6[dEv>_frϨIi9J`wB Tm0?CQ w|cLPq?.\ 0=SNCj.}©fkc 1KRGa$0a(1B(ɱNbS3ʐ;K-%)eZЋ>n҈yhF,metainit/_darcs/patches/20070616105239-23c07-7b576dfa94b6541900dce40a10d09ed76c8d97c5.gz0000644000175000017500000000050310634740372024400 0ustar jojojojoQMO1Ẃ !$hxݝe+X%@vobO޼~ ( B@(8ʂ%)(`KkR^4f%07ĭr{\̾p0nwǷ(%`8+Wj aD:ʌV$\q <| F;JSnIW.h"HR+ ̸v {K`5,DK i_gW4gxxz Lܱ?1 fUV-LgyPqEdӪ<_i.ۿ+olM metainit/_darcs/patches/20070621190935-23c07-4d67cffbb5da23b1f98a9c276b2ba40cdec49934.gz0000644000175000017500000000044010636546360024700 0ustar jojojojoJ1yKu՚̏EDnDe)&w:dHnb_Įpq.l\ AT4 .1(8qٕ6 rऑƞ=||S ~|T$ۀȶdlT@Is| xe,ˆ Ւ ?5XIk BAIMN,`[TQT1y;-‡u(D%djԯD#ZDMxz7,aܥl'W D涍metainit/_darcs/patches/20070619144125-23c07-9f49724ea4a6539ee9ccf70a73191b9cc1aab16f.gz0000644000175000017500000000024710635765427024556 0ustar jojojojo 0go(V&*RqD$MMlSCX]D\nǥD %ٞPơ:X魓S8))`dw]i&RZtTN{`d`npi[8.i#{wFdII xmetainit/_darcs/patches/20070621192141-23c07-b1d359f027f1a2fd1dd68846ddf27b42c0c9ea26.gz0000644000175000017500000000140010636547710024520 0ustar jojojojoU[O0~nThmMݸn{ai5߱۲1ViӤ=ŗwq.US[vCйBǨ*RyA*KMm[* ch*:׹@7U:kZ4wAi:>=Ecajojtl~ByO:_5:uhr>2sG'1BcV)M]L+7lDz>ԏEΉZU  ]Ғ)oc1C9R0*@\mLbJHZ\yO5I 0;*~Ǩg"0 SvP=JxTZ?MFj}tT[?Hn:i~)A?>fVWvϛ{$hgHɞY6Vȕ.KIciPncOX 'r:i~<+WFaY3/hל"fJo@8a.hS|Zۤ>\$E!JM̶4惇#8W;&Kowwc6TRdXjZ骜f^~6Sٰ#C%SBaebz]t̒+~+~2metainit/_darcs/patches/20070615212833-23c07-da3c68e65e2afda1a9ced9075083fc1dc3bc8b03.gz0000644000175000017500000000031110634602206024723 0ustar jojojojou?kA~?ŀΓ Ҥ ;Ž}D QLTc^.P9j<8hM̫ئ;%N޲߾?.m㺪׫/pLd}XxiWer ,o" >EϸO=QJMN (! ba{ metainit/_darcs/patches/20070616151922-23c07-e021857ca80ff665ba077a2f7c39a9f0a584b577.gz0000644000175000017500000000053210634777574024342 0ustar jojojojoN0ƯS% A1&FHHagrdځH| _'$hw~vp2 !,x{Ce0n6R I(:x'7'#ςYL0rrB[MeJh9 wKJ1OMWZ#̑$3#5Hcɋu8T/h8k\b=4h"&ɱe^m_~~_*metainit/_darcs/patches/20070616144522-a9d57-420c11acbde4a6fb0a499e6c1404cf63cd319fe7.gz0000644000175000017500000000151410635001552024654 0ustar jojojojoVMo@B[qJ !\8 NBhcUֻb!;3k; m/?fg{f?ڼ5PZE Q:\[ZB*xyh59/ZN0̭9?_\\zX?j Y u.۬yVN5\  (Ҍ Wa*MaS"Y'OcٺPaOܖ1c_J@T3Sbg>qR :cJj̊iA!\~>/GB+"tNtFrd88p“Pmm;JaHe^)x]S 2j FqJljϸ!/bDNkZʊs,U&M~ѻܪP6ZXtM2HBv,!pjƕ01 ~1<"lYcOϠ4\0ChM, <} <ϲeejP冃%TӐ *uחHm<6)s ~P<9`s!G3+W|7Ai#= 4(,f̴~1xĦv]v_pg0!9oI5d!gmVQ&",u®jO1rpp,F_=I9O8{鮁$L^re9 t2ql4;TSmwz,m"9ڶcЛO$5v?먔 metainit/_darcs/patches/20070612185925-a9d57-d587591c626a98c0af6a54d44d15e2d2ce244bc2.gz0000644000175000017500000000051410633740107024464 0ustar jojojojoMO1 |ƛfwѵm!1d]y}OdddSڱXsyEHLXBj(qO;g.pN؁$)RōFqٌWNzDgp!ʱf[x‘K낏2M'&y ֱU`ҾX#-ʸp_wZ*>܉'h~xB)?-UcM2K{[VW౬:wĢZ]_gᱧ8px;X2sN EL:q1metainit/_darcs/patches/20070613191411-a9d57-0317bd54817701456762d8c10d991e6695507618.gz0000644000175000017500000000443110634045531023613 0ustar jojojojoYmsH #Rlvsc*$flR) ity ٺVŀt3=|p!NXC|6_ f H/q 2Ul >_pW< "x0Xʺ0eX]y^ܞG=7KY^,dJ^WY~8[|K 5fo˫!]ުmV磫b|u90,P+7{+DFY'><+$(V_NROhl4m $#}!|Mo-;@. ;8'Β%h&,7(@E*kTߧL#܏Lih?.3br9~ucfqZ\Dr0^; `ܧO,2s'!(q:O.ÑRKl'b&:\0K|I[r%%雲UJ)<lf>]kjn^ݔ{ ,n&hQR%P6+ 31F[Sw,7!&g@Uo=UHRPUL$[&BRL90z&B}2m`61_QozǂNb$^v0/qz̯曊"WMqb:U-sܛs,UmPar@˧T&HN Y cNDlp9w^\FJ6\D @,$o[sv\c=DB=gs@f1zİ[188ݶ`2j"QJ+7T8ĔVaIr;P'|VFܬVɪQvhˆkmZ+ 9AdΌuƕX+f 䜩| FSb[ZDz}+q8FgMۀ-ddrCv $PV$ N=V+,1:!IR'փZh ;-JYǴhmC5 xRS$Ѡ[?V 837*{hH~T]MXjm])E6q1Ga7"S(Ag'/x,R[ S3 s 6;؀Qղx {zm" L %,dA$,sѫJЈsn.$Ig^,/ȣaK9SJ7dQdۭ-\Qu"0u}NS[] #st7NGߍ.qtF,1qwr5RHN* 3bD@Dv:FY;%G=Ub9gQ}.LKSd{)!0s٤02T>{|,Dj$z ?[桚 I+cXa=CKlKD$@_I^9Pm{HŦ yhڵ4+MGf~ )p&g`f6X^iuDX"Iv:>ٕ> 1 }i[v- "]Jj,"8 yt?>:+` c 4b/Iy x<x+bԪz04-ALm Yz VjM\حҡެi:PZyl6=zp:+ݍѹ xpTmCfx?F1_l0c\gӤɫJ>a7T,%OD+ZN׿mmetainit/_darcs/patches/20070616165659-23c07-28ca7ddba8dba022a37f51b6eae2ec368982486f.gz0000644000175000017500000000145010635013200024607 0ustar jojojojoU[o0~&,c*4B˥-nVM4U&16qiZBh <}f~_B0D9E4$\>INs8K/nٝf/ã .~?`- ~ J2L?I.%0X94r,g2`'D-|A9E:"i @9ˤ{0hıv{4"unDIrSL$W8%:f%S,RPdL$,)y R-E@SJg$tlXF)968U!X|B$ kx(D7"R/Ih{اv I3[_'߿t>;М*Umx|Qh;U]WҴA^fL"DhV9W 9h#ScrIER v *hϛ pMAK.VQm\{T'Y [ k"sELd N@gd krJҽǘc fbRj3aV;#qAEMB{@d#cdYd}F8t<]v.S1*~U[+#E|! A*7g :'Z7%fowc:gS?P54+ĢсҍFzF#^c0D !> ԮbFN?@iхmᇸk$Wɂjڼ`1o\i@~r) TMl RC* bm{v)~bJmo'hݖ3rײ~Kmetainit/_darcs/patches/20070612193950-a9d57-af5fe7a53e3b7de6ce9d8c8012ea66f24781c369.gz0000644000175000017500000000025410633740107024647 0ustar jojojojo 0DW\$+4ICPtMUD^Y0_-*a)%֍Q^ouS7rd@w1 KXBd&R;'m`mק?^ _M9Q;ߪqv$ fAJf:metainit/_darcs/patches/20070616163008-fc6be-0b8b1269f042eae838c2f38800cab816d4c2ef48.gz0000644000175000017500000000327310635013274024614 0ustar jojojojoYmo6lvm'4: (u|j蘈$*$M߾#E>s玢xq) #h4n7YwS&}8G8U@,@@; I5\*@=hIJWH T. R[Թ(`w/F/rA[ڕBHp?n"Di8WF.񯇲pvNC\ܡ,/${4B$D*h5nQ%RFU,[@fKR> ., @5 =T0|"B 4ʵw[Dwϟ>b~)z1 7v`Sk8耩~K !}Zͯ][;&3P 13A,-&)mr\L:6&}~ZM[ؖJ%.. o;b@}l̜bHNj: `65:YErAM$EG .<IS])Soz3Aglm:յ깧YL#h뫃JVp~hIM+c"B} J∆ ]!3֌T" |]lqq[\־<+P$+qQA3/@ 8,,ҩ1 9alW"#v192T,a̜toˤM XUdsVm)]SqjQ.fzܨLH)~ a;& K3Pp&E@qS'q`iliӕxY5h9A1mVb[l7" kJȨd~e30?  h@PEGsF_㡽4T3y,=MlyWٵg"G7jKdiӂsiWwistx3j̼U"Zohx6LJ|2j%ic9i3metainit/_darcs/patches/20070619154257-37dd1-c2ce595e8e199d826b8126fd44adc5aaf2493542.gz0000644000175000017500000000102010636001535024465 0ustar jojojojoSMo@W 8Z"RzH*$ǫ;fwӴٱ/ޝ~XZIx nj+"?$tUw>oFoGD$R |Le|Ø6j}l|Qν 6X-c;/[T+\iI#Xw4 F8t>hŵ.Ww=mkظ[RwfiI@GQɿ3?%r`߇_:̄@cUn%BL o?RR +yEe<>Д(U h3'$Lチ{Ic}hA JT B9\ k)~X&vJUeOߓ "OH0"7*M2V 1PjLnztmetainit/_darcs/patches/20070614095033-23c07-b34af80291f9ee2f16db84c43f24b9007168341f.gz0000644000175000017500000000027310634207570024231 0ustar jojojojouM PE׽_1+E{YQТUgN9Ōe 彇35 8Q4#A\73h,1bcBRɆhE1'r(ݾC%;_l\CbB9+v _y0,}vLa wZ<Jmmetainit/_darcs/patches/20070612181757-a9d57-6d7b709225f2ae63d98d2929d5e419283523b929.gz0000644000175000017500000000354310633561634024151 0ustar jojojojoWms8%Ѧi$pS.p2I0$:L~:%\SҾﳻ~ HRHY !E :lCS)Sse%Wzmt?:O?W<6O}5w,C3sӀ$n;o<Edu ['qcxڃ 3:$\к=WUf#ncq5ff8X/[ͭ![!oB ֱzçFL-k5ZJa(SPSK"9)OW`]2s\jrzxÓ;:uՅ@`tuF[&4ZUܥ[?ˡ$[C>eY4@xm1|N'h}6ɡ{ L8T8"bʎou** ?$[q$JFBV*93?Ob hMg=S$Bmr2ʩ7 %A%Чԣ>g*}xkӗmetainit/_darcs/patches/20070730134502-23c07-51d7407e04e1d6e306ac60a29574e458b3857b69.gz0000644000175000017500000000066210653365543024101 0ustar jojojojoSn0 +xvY5=bӶY2$Y1';^Ң@; |$)rSA,gvyшkC)2Z.n'8*)ͮ:NE.GbMv%my|oqÒ:.刄,*!zit,Q CFesڷպHYNr:rlew1 sB+ج0T. Sӫ˂ѝoӫ Sϐ|y4n1~9ӜߐBy=:zGޣ!^V UDliDռhI /(K&U qK r#۞7+ metainit/_darcs/patches/20070619162141-23c07-62eaee3665e36d69929ae9dcc005ea2b642acf63.gz0000644000175000017500000000024710636001226024527 0ustar jojojojo= 07[4E*+88+}IR)]]JQ$gyh4mO)Z16ᴙqpXyKe! /&m 5pi@f$K@0b[ S,9metainit/_darcs/patches/20070619162311-23c07-bb6fee33ae8d4887946bd796639bd6ca22181bd9.gz0000644000175000017500000000100410636001405024460 0ustar jojojojon0S,KŒFKz+kK wV(ҢCf?Ό՝E@5_-&iIPa#)0.&ٶ`r@nǀ&9 `i~t+\^庼+׫Eӹªc(W"{|xB.oY'*SbOS Luя Zvm/i1RE9Ǔx_!;, 59=t b*ȼwMsU{5\C44LIzѳ:=8g{kL4z0EF4Ԓ2`^g("&g<eNObj/W8wĊp0\ő:7!FSScC, [ "4)8ᕨt9mwwSָ-h 52"\߲B*O"bqRӺo(E63S7bq>rD^3Oj4x~ǘ`aW7K'zmetainit/_darcs/patches/20070619144558-23c07-8444ae73ea08fcce2540cc1b2e89d1ad5acee479.gz0000644000175000017500000000046410635766047024716 0ustar jojojojoU=S0 w L MS8>18E];QIwz}爚5ybhu נkKkxH1Z{޵վbQ\Oo|~ e;|b"'uBeo;UeQ5wQ$ʖآ7IZpʽRe a1 Xh %U8EUҿ옐l蜁 K(`{ZrxqQkOmmetainit/_darcs/patches/20070613100605-23c07-91a788f9bffc20d602997333574e1b1a608ea9db.gz0000644000175000017500000000222710633740621024313 0ustar jojojojoVmo6l"vZ'~h0CD\$R%8AݑD{}#,̭v`ƟH6W,Zi.NR&^<.ØϏW_&Kxh8^pĴf {sKQY\fLÃQnZQu5{`5R/fV~bpC;喑ǫBk8w,nZ3mTبUXH$ n5ډXr4GsPrVeu!KyL"' QMYVN~RSesKD}9*=~Hw[뺄3g1 ,Ijv}B*Z(TctF{`(%ߥUΖ. Y\K޼O1"&fETCC P drOQG:DCPͪuTTw&o硾N[i\m9҃E|w;.{Wh=փ*ͬV슇䭪 b2`jr)^H8{SkI,<JTxFU_y27Ě"汭mP]רޘg\\F4vX%uB3 D_<ԹUmZ\hkm6S)(}T*!qZ{a~m)MƠ@(2  ;s=jilG*?+,j>!|TvEmD V\PT7j-i|xEȴ1,s5<ɟ'Ӭ|E .Ϣ秐 ҐhM[idȆr=WdişFǁFlbM+BP !|-0  P!2-hV`)(ךKQ3U[=!2f:YNBa y9.S_x B⭷}7_i|`4\t)9lRF#twYÌCiue<: Kc_pS|g)$6Og?IESF7٣fAIZG!=_J%^=ةW0051ȑv`e4t^Gy?1^U߾⪦#9XFӮ{.mNԄ metainit/_darcs/patches/20070619161104-23c07-d44ee3ac64d74163241567d7aab0289481ec02ef.gz0000644000175000017500000000041110636000034024257 0ustar jojojojo}k0sW ;Ô-Ǝsib;RsW{rjg}dg\UBA.cՆ<"<(!uĤ2ױDLA pM8-I\^OԣQ _Bb?aGam~0b4Lzl4luɸKwf9\;3F2Q6pDq(z\y-\L.X"}w>/;3tekV\/YbiOWA{Qq] c18Gn&R@Jo ڗV' Ymetainit/_darcs/patches/20070614095113-23c07-8015577da7b7df4577fad2cb154233cafed5c587.gz0000644000175000017500000000033710634207642024460 0ustar jojojojoAK@+PhmU "ɋPS6 HO^7%h'4@,ӳ8?l  =g%2W q) m :L\y|sPnX\metainit/_darcs/patches/20070613185216-fc6be-0d8cdbb11dd88da0059e9878f41323d74bb4c096.gz0000644000175000017500000000034310634045531024617 0ustar jojojojoN@E&$(i (Ǜ}]U(h9}mhjVL3;tE$*Ӈ,]B/Gз{& ިFmkr# g#SEP 22Q.`&P埵6/%דmetainit/_darcs/patches/20070612175640-23c07-3324f705cb5cacb30b3df1476796066902b34047.gz0000644000175000017500000000022410633557127024056 0ustar jojojojoJKMUH-QL*J,T(HLNLOUIiry'&gd*8f)&f8dAuz)vZZFfFf& \y zEũz \0}SK=2K\0  yϟmetainit/_darcs/patches/20070730134615-23c07-5b75e27dabd861ed3f5fcb292c33834f6d1d42d5.gz0000644000175000017500000000037610653365657024553 0ustar jojojojoj@EMB J)oEKW]p+sAHrǎN8nG;Pmetainit/_darcs/patches/20070619134313-37dd1-042d644f2cc26ebb8944e845146d7b5caa7f5930.gz0000644000175000017500000000021010635766740024401 0ustar jojojojo.-NU(.)L.V2ҋr23KlrRRzEvZZFf&ƆƱ \y z9I%y%Eũz \HA8jn3˧metainit/_darcs/patches/20070616152604-23c07-014f0466b36d41f0ff2e758115364bb4b14cbd45.gz0000644000175000017500000000031010635000424024165 0ustar jojojojoUKk@FίB@|LtUUq16ẈTnD7.8kyB,=?B>4RT"ZR<>5?tq1B"O$Ks1Õ9A<*7V whj#i1Qqkdžo8{pY =QdYo < n;a7vF zmetainit/_darcs/patches/unrevert0000644000175000017500000000150210763540736016044 0ustar jojojojo New patches: [unrevert anonymous**20080305155302] < > { hunk ./examples/cron.metainit 6 programs at periodic scheduled times. vixie cron adds a number of features to the basic UNIX cron, including better security and more powerful configuration options. -Exec: /usr/sbin/cron -f +Exec: /usr/sbin/cron -f -o Required-Start: $syslog $time Required-Stop: $syslog $time Prestart-Hook: echo "This is the Prestart-Hook"; } Context: [add XS-Vcs-Browser header Joachim Breitner **20071023225531] [fix for 435148 Joachim Breitner **20070730134615] [fix for 435149 Joachim Breitner **20070730134502] [TAG DEBIAN_metainit_0.0.2 Joachim Breitner **20070623122905] Patch bundle hash: 09b75ed7ba9273113048326e141c43cb3c9eb091 metainit/_darcs/patches/20070619133948-37dd1-0e861c078334fb44e2be5627fa9ba3b65f8d33c4.gz0000644000175000017500000000040010635766740024475 0ustar jojojojo[K1+ƥ`oh. EI&K6^7RA/gC֔Æq8vR1*nL@T2b(v>q|_&$f3|z'^!8[EB0-0lH)3E/wc` = p!r2:Ywom\PRV. L;ւSik|`vT&4^p|o)Տmetainit/_darcs/patches/20070619220018-23c07-11645f18082cf564f35079217de38afa581521dd.gz0000644000175000017500000000025110636050762024065 0ustar jojojojouʻ 0=OqF4M:x Z"8=Db 8|Y.79:ġn L02/qїrx=G%ZQTԊ*ll[I\pمf.] O{c3> Cpumetainit/_darcs/patches/20070619220004-23c07-62699b58cff11abea8cc903882d7c34a80bb853b.gz0000644000175000017500000000571610636050744024460 0ustar jojojojoZnF}W͈b#kŲecYxcH6hX`m/_I%jfrT|xw-;yJX.ki?Fho}xF ikٳd=믾Jh?LJ ~f`[϶>__vK-+U(;NYވWD"U/TloJK^7|{e <*#9/RׂF)%[0D$ 5 ȤaRh$/1lO{EWnRLNTVm nŤnaFq^L#WĊsBi-rNߞ˜P 9M6sZA=TF'FWZVCJ˒U|HǸ^$)R/Xl+_!iF^^JQBJy ?,x+׊_1y ԅwע~(C (aJ npk:j#v>j(yxM̲}`oi/t|8`žbe΁/p>Ze&uT~ yc,4SqLpoW0J1Sio*W>&:ߚd?}9S4^o[(Ωqx7>(,8$e++PNnI2B)q@+9F*z@K8y Ka/#/m>gD^Hbd;3 orQH h&յC=/;sH A*8^kYq- =oO:Z`;c;עEcb LZדMvI,RdQi HT{TӦ퀫p mq:̓$¿qtaa a;k@T%u$u+<0O7x9a' nV{fJԪLnsf:>Dp|W3 YC7 }f1jrnhRBRT]ʷ8]JTZua/oDN!4-p,tD5Ҷ-_h} s/]oS9\gSDVO4,ˉ,2s =fHv?YC:<&1 B?Gp`=rIM:sa3-T7oA .w8; G{jڊv>ҙ=\nA3og]7Uo(i@bBn}Y&$>e5ܼTѶ ~Dr:Y z;ޙEޢ |,BU]ۑȗD5>-ISoA,(W̨ :T -HK?{Ȇ5E\8 ib'2vg,b`1Ufi4fO!ܽB/1ΐF8qtROFalq/u7 ̖Du?&rf1td?TH&MclA3%ݝP:uΊo>:m)퓊Q D^! ಣ#\mk^r9f~)lB{]|$$NROFpIuצ$c"[C]uxᣐ eWY0KG7RgK 9pI]˦!F qbפrFBM)Ts:ˢl[F.yٻo^=\;|Q5!%[;.+Bs-F/01a87¢4q\țr~Is)A))>Zn R< ˵^8aY0wk@mA&94Gh춍NӤv$18?<^Tt请^vJf#o.T@/rLȳ SfBQ-~Q V3"#kv{yr/Db{u '̡5[۴jq&tXUCK2O]= tgT;P)sOv6LOs)_ZokTsLK3qdiB`7zǒxe!-M7g x46>&=gIi[n(${Vp.[Kp-vQ0i&r: mJa].d.>wۘ)s7g{Nص9ԬR)37wLcp'8VTۄUHnqhkM;%hd[V4w*7nRCHR wtu,:,hI.Ewws[kPƺwJ!|N F( P K6gT[Z9ĦY]%nyNj0A+taW1`OW+9Ə=-x~t/?Yߘ~kJi(Rdmb3qe̎,dܓ0+@t\ka+{-9yrF 6<=TVÙ;iuЙu> wr=#w"ΰ c&2 @ 2F# ӎ64z Ǝ6"I74]ȺW٢me캶[§3C3BSۈTifzX_iՒlh &Kojlj.tp }>hX>6#񚶁744K}(؂0metainit/_darcs/patches/20070619134008-37dd1-b6699a33dc27b1dce631cb7a9a9fa2b35e65bdd3.gz0000644000175000017500000000040510635766740024762 0ustar jojojojo]O0+ 6k'Ԡ&^n^FC.mQws,Lo9=)֠Dc j!Ri3Uw|%KP;f쌝F` f1}D2akaBtSK5^'e1votbW`r)GL@x .p f{BZ>R'sŚ!3ݮۅyWGfؑe_5metainit/_darcs/patches/20070619172205-23c07-9377331410b9a670fb1052f0865c58e1a62aa1b8.gz0000644000175000017500000000137210636010315024044 0ustar jojojojoTN@}nb[vDQ %!UQ.B[ֻ^uƉH+Bxsf륙rf A:0u0\ahWF#Lt3'¨ /F,¢-Bt27H1}ڌVF6tn88|/KŝAj >Ug^]Fu881%RLo87 @l640%_K]?metainit/_darcs/patches/20070615201949-23c07-061015d4ca2b5a1376710e428497fb231aa94ae5.gz0000644000175000017500000000074210634572154024133 0ustar jojojojoTmo0\+] e`ZU|xv*U3$Sr=A3-#a$94Pk/ b&Hi%Mr\*8BXh0n~ ;_ag`6Ӛ3AͣҶȃS-}Ӹy,d&b6Ѧ[);F%,si%s.5zp(;Fcζ6V78gy8&43VqP_s2^Hz*6v8LݧQ-ul"v^ҤL>׌#LTÔAŮ>3%K-kj;)/=6==wUe}ɼ>/g"nL&'~PORͬULA&$P=tRW'޴onˌ.W̠bвB5.KޟJj:ZuJTԮd=DKZ=metainit/_darcs/patches/20070619142559-23c07-6a0f5f9562a2d47990d81b5ab78ce07777ef99b9.gz0000644000175000017500000000021010635763575024371 0ustar jojojojo+.IQHH-I-OLUp*J,K-RMqȂ&ARR - MLM-cSR2sRSR2sSK32K6deW0҆j=0metainit/_darcs/patches/20070612190408-a9d57-3d1c043c30ae282712c1d2a9562fd555cb0b0cba.gz0000644000175000017500000000033710633740107024472 0ustar jojojojoKk@ί W$c݈_q 'ILQ,,rԝ]]iJ yJ۬֏Rl\O(;{zt&KbWҿZߝ G7TER metainit/_darcs/patches/20070621185413-23c07-d555609676b1ab0625ed446085860fc6b7e70d1d.gz0000644000175000017500000000036110636544530024155 0ustar jojojojo}MK@+R(fQ[k* b"M&n6N(@~ee})RaxƯl,"zXP je1H1Š G|qVXdDLasD~Q F{? 3Mkmetainit/_darcs/patches/20070612191528-a9d57-15e07cdf595ff66fd8fc441e46d862af10776def.gz0000644000175000017500000000033010633740107024650 0ustar jojojojoj@>ŰdIlPV"lfnҙقޘBQ ?1߱dTPBcnQ[W>7ֵv Zx?>xIؑoDE⧀THkZz&ˆCnq>0%UwFO| *LϏ7s郺}!ܾib:{[/s5wIA_hhuPe8:metainit/_darcs/patches/20070612194258-23c07-08f293f95d360567d95c86642ce6325ed500f4c4.gz0000644000175000017500000000016210633573502024117 0ustar jojojojoN/NOLUp*J,K-RMqȂ&ARR -ML-b2JS rLl5W-vlmetainit/_darcs/patches/20070616105948-23c07-5cf2dd55c51331f6c8400837950b473eed956c19.gz0000644000175000017500000000055310634741250024172 0ustar jojojojoRN0<_T4u *$.pLĮl%w8CޝٙY鱔svUB gT,N+ g[ITuAX~e֖G 0\h |0kIʉRU4Dꇝf+.&5`kPPTZkiVAGTZG!u1s3B7"̀J n2P;`e#_:b%X&:+r/ٖI47jY8Gwoє霢 k,IqNf=[HԒFJR22)J0Y| )\-OHEEC(KXhV]?,C34Ηz1uytg.X'tݱXQ iNLIZͤ)yƣ9zw[:槛kc2|0&GBt3}&2k!X3Ի+AM[n`MmlQbCMAch&V0+vScr-p 낢6=E,=[7ևF5DxADswJ d ix舏GUl8@Zd'I[Bi[5ĘFBq E*ŝj-Lo>>^.F.,Dg  VQ"r5:֢ȁ-iFZ)A xOp1]e{60Yt" "!yWw+ mLoQ?TTn|`U:}<0*zhS/tK@: 9imfwUv'cK$q{RX*tcW? metainit/_darcs/patches/20070619154230-37dd1-8ae85f45e279e1f40c85d90fcb5b9b7e3af857aa.gz0000644000175000017500000000033210636001535024710 0ustar jojojojoOk1,,(?*j ,׶H14,/Պ߽{̛.A:ބh1{FE!HMz6"?g1n(FŰwm'ܚu(YrP\WUf(1~y,CWj]}W?.dgmetainit/_darcs/patches/20070616165742-23c07-60eb103cfe682a2be0caa83cbeda43ca4131c95d.gz0000644000175000017500000000032610635013215024705 0ustar jojojojoKKA+},AA]r235 FsP]UOnq$הCܪ@Ydɞ#Gb_~pRs;zR_ \Tf_QVVVgV ~9z C 8^hwv;m|?suGhyғs,Ӯ69XbcܒDQ3[zl@Wu+һXiAc'}%mkXPd *-?lFπ+I*{< ]:dQm:@4\ yzfzn?*Qiٔ$/f4ۆ(9q*luX1] %5(𺂄4[2 +~5O(!ssNi`l<"YE#{%"p NH*YCFZ6xwPV 4ᇦrx1Z z<հ3`wTp7GT]޽rt^=ͺ1v7U<놿tZpX{c8chgʇ?D՛k)v^ WC8?ax ҥ5ƐHe>KI>6d xTP{foRQ)-`U2Ȕdz&(41܎$r-PyxxNO(byu\=R~ ܥCq5I>NP,0pJ ;VUK3gCa:V{n8? (ns*A~J=ˤQ V1D318#4e.Ӛ7`K4 _ڤ&ʗ<Շ(?4j]]pyQXm@OJD֖j\0>+F<]KC1L1Vݢ/ۛ[M -a8hJlmetainit/_darcs/patches/20070614092638-23c07-5ab39030a681ce6a4ede37ac286c4d043f6d6cea.gz0000644000175000017500000000042010634204720024571 0ustar jojojojoQK0ͯ-l+MWw'rh$J7S`Kר &{ 4*0+k 4=q[ UV(߿1z級LfIHf6~y7W}nXyʢp3оZz#nj)qUl!"A\vQ ɢODIEdW'Զ,_WG_۷O^=q(ɦ)ssaGMY˾Sqmetainit/_darcs/patches/20070615203450-23c07-43772914b9a27edab94e0d1bda007c1b97636ac6.gz0000644000175000017500000000037210634573753024364 0ustar jojojojouAK@+Ԑ4F/*ZjAAD6I4o }y.ېFd`mQ;@lA*d4;4NuR#Eg$s1q'/&y'lg | d:;g+ug?Rƛk 0ȺۑX{ֿ;۷dIr[fHD:pbZ|eZfb1SCpUmetainit/_darcs/patches/20070616161650-fc6be-ee5c83378c9117ebcdf11306523a80e3c580715d.gz0000644000175000017500000000106310635010523024442 0ustar jojojojoms@_OChmu2yNދ1lF8!ho7PD$s 5,g\"lx&>7S/)&nV׶?Nql yb-xaa)!,zm6,s0/NpiݳЌCjʄӱvi:xuE L0D!iebÃ:@F3vf˲q.a,P(*X`"/\+j$j\IO`=8wcei؉(ߨ?TWD`I{Pnvn􀑜n@W nG8B"Bad(3E\_)zC/ YvoOYSɡ8a9Զ.Ο+fͼ;#,Lpwc8@W PΒg>Dލ(me(=V,x_^ G:~bD$$'$Zp:~WBNkz5hys=n֯Lmetainit/_darcs/patches/20070616153536-a9d57-58da983a2d225c2ae6e21ba1825042d77ad61ff0.gz0000644000175000017500000000036210635001575024445 0ustar jojojojo=O1 g+ϫ*fٴhkaE6I/tɁT乐'_wrR~Tu >:S4؛*Y5ۛ$aC梵 N٫?a~ <៎N7 D|ametainit/_darcs/patches/20070619142529-23c07-0a446d7d1d6e63900af83920905b012fc405b666.gz0000644000175000017500000000023510635763566024077 0ustar jojojojou 0EYWL⃂_fԍ>q¹pa'GRʅ= 1'Ld\M,\>b?pm".B VoЁ:c7VTP8TdBaj?S8t9?ž5B(vg,]j;0BcPY/ءO_lI6D&73hq@8q}/r(5 G`t..'C"&t񒨊[w2ER7g:e P38--<(qD\U1_S,[4\ĵ(V4试z^tw^x,w-xކՊ_E^X%"N. ƺ8;0 XNMTz)?8(|metainit/_darcs/patches/20070619212720-37dd1-9aae78310106b908f0e0e8ce442fb10fe46aeb7d.gz0000644000175000017500000000037410636045235024603 0ustar jojojojoOK@G)ܐ4bxxw`3(~wSJ/~|hyLВ1w ^c[fm]/mE[՜@:Ci8Cc5]B"؂cp'7$gB8ea =CqxIb'!AƠ0*I,L-dts')(g/ſ|cmetainit/_darcs/patches/20070622112138-23c07-23bacba952283854f7e5dda6e04c37f1b8a5c287.gz0000644000175000017500000000020410636730302024432 0ustar jojojojo-;!ОSLVOb+a. Oe*SN׌ s8ki=9>Qjvhmp=-0mb&qmb^(F_C}metainit/_darcs/patches/20070619153147-37dd1-7e72e7867ea741cecb3cd5eb886fefe9ad63f0b7.gz0000644000175000017500000000044210635773531025101 0ustar jojojojo[K@W MZ'E|U $]D%lA8/̜9sd +I( 1֤4F /95Igkiۦ) &A0ËloeJ2?`,O  Vi xޕ ͰIE͢iӷލX} iXAKV~p2_#`kڧED ~HFf; lmetainit/_darcs/patches/20070616144621-a9d57-7d9987fc952ca0260d2ac0122750a0a2b27b2e50.gz0000644000175000017500000000050610635001552024262 0ustar jojojojo}Ak@WL$hA,i(KRJ)w% jkJ ˻޼஁To @3R2VƁ_83 BbX.D]R8 (RpdA-)1VGEW,ry8x~*j~EWP`)Qa mr9pt*QaV5 7cۦ$ĝm,Y3 ua2qP~κC>J^LmƵ!ei{O;7=reTq޹uB0<7Z7metainit/_darcs/patches/20070612194019-a9d57-ad85e83b95ebf171a9de0fb9d332de2eafaf8f6d.gz0000644000175000017500000000053710633740107025221 0ustar jojojojo[K0+>CBAE܅w΋f6KBc\tY'4KI:%)*5v0ݫ{Jb<`ObcBxRD)%u-_%=njA]u:C'A? %$v{y[E-J'H}ۗr۠vLUPFZ[͟'-o0p>Vl!< IhĴ@o XhήgtB?J8;@ijkza~g &]metainit/_darcs/patches/20070619175230-23c07-9c7fd8e7ab170ee826c91ba1f820a3ef8b96a005.gz0000644000175000017500000000160410636013771024535 0ustar jojojojoU]o6}~}\Heh% P-^Yl%R(F{)ɖ='(V?}=<~7yJ4<Jm#AI[taD,*°*Y Gϟ P^\nLoh"4W?xp_ ba8A- lqoߍǓ[FÛu e5 0),rJ[a+GEˆZ 'P ANh ѪJH)Ha\p5=ѬHhM/xx.Ykcý$B&K2(EɫfL:|$"! *U9Z1g(=Stޖ55=; h¥s8owEԛr}ӧ]]h>'9RXMDaToKPTP<Z%%nTJS\:RP BKZD4/n "[kkk4Duͷ_ 部b+fڕzqOpl.7|9[GzSmfnLz-#-6rd;l^0cM{+ZOݻE Fu{äJ76}f 6ptP7OG Q/'6Q ^5n;7Hj 㲏x7`2辫AծS׮J7`U =?2C߽q@UwHIWjM5f몄UÍrU{nӹ*AO&uUU9]K/k'x metainit/_darcs/patches/20070616150348-23c07-6e4ebc92bcfccd50b7a411dff1afeacf97526d46.gz0000644000175000017500000000020410634775724025116 0ustar jojojojo+.IQHIMLSHHKOOOLUp*J,K-RMqȂ&ARR M M,b2J!+sisdCUU#މmetainit/_darcs/patches/20070623122905-23c07-84e9549a1de8aa735013875d46c25001901fb5a3.gz0000644000175000017500000000066410637211021024052 0ustar jojojojoKo0{! b:.1Zqȡ( J\I,PURI Oٙnϻo77tKAqhc+x</5^Blz%z+.~CuU0&<5|}B"L>j,Kld}6x Z6faTEZZ.30 z #m| #vGPz (M D)zhF(YQz(W /6>/b KuخbOԩXC1קsY#z ӓC@yH!csI*R6. .`x{8fe]Hď{uLM?Pˋ\eɍ*A,5_zm-dmetainit/_darcs/patches/20070612165234-23c07-3e803347114793c740f894cdec3a6416a6738025.gz0000644000175000017500000000030610633547522023734 0ustar jojojojou @E) y "B,,,5;n݀""bssw]J9=r[hH 9ƒS9=߽q p&Q4qIB2~ ) @ȱCN-[ri.քvGu ~k2(ƥбW[=tIҺq{e3metainit/_darcs/patches/20070616160413-23c07-f4a4ca1faf71ffd7075a594f38d503ba66330d66.gz0000644000175000017500000000112110635005134024426 0ustar jojojojoSMo@=׿b"58v @HJU*8T=cezYw)B)dKμ7|IH9@^8E؜\L>[TSt6Ja}NNq:>FwJ~U-ыQ>_08nQ}˧iƿ^ ڽӕ^iRcH[( 3J7|]Nq™Awv b ݋ls)̶=V#QZk metainit/_darcs/prefs/binaries0000644000175000017500000000064710633546513015462 0ustar jojojojo# Binary file regexps: \.png$ \.PNG$ \.gz$ \.GZ$ \.pdf$ \.PDF$ \.jpg$ \.JPG$ \.jpeg$ \.JPEG$ \.gif$ \.GIF$ \.tif$ \.TIF$ \.tiff$ \.TIFF$ \.pnm$ \.PNM$ \.pbm$ \.PBM$ \.pgm$ \.PGM$ \.ppm$ \.PPM$ \.bmp$ \.BMP$ \.mng$ \.MNG$ \.tar$ \.TAR$ \.bz2$ \.BZ2$ \.z$ \.Z$ \.zip$ \.ZIP$ \.jar$ \.JAR$ \.so$ \.SO$ \.a$ \.A$ \.tgz$ \.TGZ$ \.mpg$ \.MPG$ \.mpeg$ \.MPEG$ \.iso$ \.ISO$ \.exe$ \.EXE$ \.doc$ \.DOC$ \.elc$ \.ELC$ \.pyc$ \.PYC$ metainit/_darcs/prefs/motd0000644000175000017500000000000010633546513014610 0ustar jojojojometainit/_darcs/inventory0000644000175000017500000002632410707475747014620 0ustar jojojojo[Example File for cron Joachim Breitner **20070612165234] [Parser library Joachim Breitner **20070612170251] [Rename Perl Library Joachim Breitner **20070612175401] [Rename Perl Library (package name) Joachim Breitner **20070612175640] [Description defaults to Name Joachim Breitner **20070612180424] [Add basic script to create sysvinit rc-scripts from metainit files urs@nerd2nerd.org**20070612181757] [Fixed Parse.pm and create-sysvinit-file.pl. urs@nerd2nerd.org**20070612183305] [Split Dependencies to Listref Joachim Breitner **20070612185342] [Added 'Desc' and 'Description' to sample metainit file urs@nerd2nerd.org**20070612183821] [Code Alignment :-) Joachim Breitner **20070612185618] [close Joachim Breitner **20070612194258] [Handle descriptions and splitted dependencies in create-sysvinit-file.pl urs@nerd2nerd.org**20070612185925] [make start-stop-daemon launch the daemon in the background urs@nerd2nerd.org**20070612190408] [Put quotes around parameters that may contain spaces in the created sysvinit-script urs@nerd2nerd.org**20070612191528] [Correctly record newlines for multi-line settings urs@nerd2nerd.org**20070612193950] [Prestart and Poststop-Hooks added urs@nerd2nerd.org**20070612194019] [Start of svs-v-init-sort-script Joachim Breitner **20070613100625 Start of script that tries to sort in new init scripts into sysvinit, trying to follow the lsb header dependencies. ] [Wrapper that calls the per-init-system-translator Joachim Breitner **20070613111853] [some comments for update-metainits.sh Joachim Breitner **20070613112140] [cleanups: whitespaces; checks for mandatory fields mlenz@physik.uni-wuerzburg.de**20070613183204] [Added a preliminary debhelper script (slightly modified dh_installinit) urs@nerd2nerd.org**20070613191411 It's of no real use yet, without a working update-metainit. It's also untested, ill-documented and incomplete. Rejoice. ] [typos mlenz@physik.uni-wuerzburg.de**20070613185216] [added proper quoting to some variable assignments mlenz@physik.uni-wuerzburg.de**20070613185303] [sysvinit translator (not doing much yet) Joachim Breitner **20070613200152] [Parse return hashref (probably easier) Joachim Breitner **20070614092638] [DO NOT EDIT header Joachim Breitner **20070614093042] [Remember filename when parsing metainit Joachim Breitner **20070614095033] [Redirekt output to second argument in create-sysvinit-file.pl Joachim Breitner **20070614095113] [Copied update-rc.d, for local testing Joachim Breitner **20070614100842] [Local paths Joachim Breitner **20070614100920] [Better local paths Joachim Breitner **20070614101254] [arrange-sysvinit.pl takes list of inits to work on Joachim Breitner **20070614101356] [svsinit.pl translator in a first slightly working version Joachim Breitner **20070614101418] [Warning added Joachim Breitner **20070615200324] [Moving Files around (removing file endings, libraries to lib) Joachim Breitner **20070615201949] [Make local testing dependent on $METAINIT_PREFIX Joachim Breitner **20070615203413] [Provide bash-snipped to easily activate local testing mode Joachim Breitner **20070615203450] [Create utils directory Joachim Breitner **20070615205409] [Debian directory Joachim Breitner **20070615205543] [search utils and translators in the right place Joachim Breitner **20070615210021] [Explain ./usr/sbin/update-rc.d Joachim Breitner **20070615212833] [documenting and reorganizing MetaInit::Parse Gunnar Wolf **20070615224741] [may_modify function Joachim Breitner **20070616103940] [Name: no longer a field, but taken from the basename Joachim Breitner **20070616105239] [Removing initscripts Joachim Breitner **20070616105736] [Purge as well (purge removes even modified init scripts) Joachim Breitner **20070616105948] [Remove redundant comment warnig in generated sysvinit file Joachim Breitner **20070616110123] [update-metainit sounds better to me Joachim Breitner **20070616144308] [Install perl module Joachim Breitner **20070616150317] [install debian changelog Joachim Breitner **20070616150348] [Get rid of perl’s undefined warnings Joachim Breitner **20070616151922] [Comment about purging and removing. Joachim Breitner **20070616152411] [Make generated init.d script executable :-) Joachim Breitner **20070616152604] [Documentation for dh_metainit now more closely matches its actual functionality urs@nerd2nerd.org**20070616144522] [Don't copy any /etc/default files in dh_metainit, as creating them should be responsibility of update-metainit urs@nerd2nerd.org**20070616144621] [start-stop-daemon should create the pidfile itself, in the created initscripts urs@nerd2nerd.org**20070616153536] [Documenting the converstion to metainit Joachim Breitner **20070616160346] [Handle daemon basename to start-stop-daemon, to make --stop fast Joachim Breitner **20070616160413] [Fix permission setting Joachim Breitner **20070616160551] [ * subsituted tabs by whitespaces mlenz@physik.uni-wuerzburg.de**20070616161650 * added vim modelines * added 'use v5.008;' ] [No-Auto feature added Joachim Breitner **20070616165659] [Only Exec is mandatory Joachim Breitner **20070616165742] [ * whitespace fixes mlenz@physik.uni-wuerzburg.de**20070616163008 * used min, max, sum from List::Util * vim modelines * more descriptive error messages ] [Merge change Joachim Breitner **20070616165929] [Make local-test-bash-source be less environment-destructive Joachim Breitner **20070618194256] [Do not use List::Utils min, max (we have special handling of undefined values) Joachim Breitner **20070618201855] [No Shutdown-K-Scripts if needed, moved logic to Parse.pm, to be done by inheritence Joachim Breitner **20070618202028] [Describe the conversion process better (improvement welcome) Joachim Breitner **20070619142518] [Install converstion file in /usr/share/doc/metainit Joachim Breitner **20070619142529] [Install examples Joachim Breitner **20070619142559] [Adjust update-metaint call in debhelper/autoscripts/postrm-metainit Joachim Breitner **20070619142712] [added ; Joachim Breitner **20070619144125] [Create dh-metainit package Joachim Breitner **20070619144611] [Use lexical filehandles Florian Ragwitz **20070619133948] [Remove a useless block Florian Ragwitz **20070619134008] [Don't raise errors if a mandatory field contains a value which perl would evaluate to false in a boolean context Florian Ragwitz **20070619134048] [use strict; use warnings; Florian Ragwitz **20070619134313] [Some refactoring Florian Ragwitz **20070619143144 * Allow data to be parsed from filenames, filehandles and strings. * Factor out things into smaller subroutines. * Allow the caller to set defaults. ] [Make all the scripts use the new parse() conventions Florian Ragwitz **20070619145726] [croak if no input was given Florian Ragwitz **20070619150356] [check required fields before processing data Florian Ragwitz **20070619153147] [Fix Perl error Joachim Breitner **20070619161104] [Make debhelper work. Removes previous init.d scripts and default scripts Joachim Breitner **20070619161129] [Additional example file Joachim Breitner **20070619162141] [Document dh_metainit behaviour and install manpage. Joachim Breitner **20070619162311] [Improve an existing error message Florian Ragwitz **20070619154230] [Test exceptions Florian Ragwitz **20070619154257] [Remove generated dh_metainit.1 Joachim Breitner **20070619162542] [Adjust debian/changelog timestamp for internatl release Joachim Breitner **20070619171245] [Copyright file (hope that is ok, or should everyone be listed as copyright holder?) Joachim Breitner **20070619172205] [Correct FSF Address Joachim Breitner **20070619172626] [Write out package description Joachim Breitner **20070619174936] [POD-Manpage-Document update-metainit Joachim Breitner **20070619174954] [POD in Shellscript is not a good idea :-) Joachim Breitner **20070619175230] [Remove some tailing whitespaces Florian Ragwitz **20070619212720] [Rename `Desc' to `Short-Description' Florian Ragwitz **20070619212752] [Desc → Short-Description Joachim Breitner **20070619213655] [TAG DEBIAN_metainit_0.0.1 Joachim Breitner **20070619220004] [Bump version number Joachim Breitner **20070619220018] [default Require-Start to $remote_fs, which is almost always right Joachim Breitner **20070621185413] [add more facilities to defaults depends. better save than sorry Joachim Breitner **20070621190009] [lsb conform init script: return code for non-installed Joachim Breitner **20070621190935] [No default file parsing, there (hopefully) is none Joachim Breitner **20070621191027] [Hopefully adheres to lsb return code standards Joachim Breitner **20070621192141] [testpatch (darcs debugging) mail@joachim-breitner.de**20070622111949] [second darcs debug patch Joachim Breitner **20070622112138] [version number 0.0.2 for unstable Joachim Breitner **20070623122701] [TAG DEBIAN_metainit_0.0.2 Joachim Breitner **20070623122905] [fix for 435149 Joachim Breitner **20070730134502] [fix for 435148 Joachim Breitner **20070730134615] [add XS-Vcs-Browser header Joachim Breitner **20071023225531] metainit/_darcs/inventories/0000755000175000017500000000000010633546513015162 5ustar jojojojometainit/update-metainit0000755000175000017500000000120410636013646014376 0ustar jojojojo#!/bin/sh # Interface: # Rebuild init scripts (e.g., after a meta init script was added or edited) # $0 # # Removed meta-init-script: # $0 --remove-metainit # # If a init sytem is removed, the maintainer scripts should # call a script that cleans up the generated files for that system directly. # This will probably be /usr/lib/metainit/translators once if test -n "$METAINIT_PREFIX" then translators_dir="$METAINIT_PREFIX/translators/" else translators_dir="/usr/share/metainit/translators/" fi # This is just a thin wrapper around the per-init-system # translators. for trans in $translators_dir/* do $trans "$@" done metainit/utils/0000755000175000017500000000000010763540634012524 5ustar jojojojometainit/utils/arrange-sysvinit0000755000175000017500000000707510635767423015775 0ustar jojojojo#!/usr/bin/perl use strict; use warnings; use List::Util qw(sum); my $prefix = ""; $prefix = $ENV{METAINIT_PREFIX} if $ENV{METAINIT_PREFIX}; my $metainit_path = "$prefix/etc/metainit"; my $etc = "$prefix/etc"; use MetaInit::Parse; my @new_scripts = @ARGV; my %facilities = ( '$local_fs' => 0, '$network' => 0, '$named' => 15, '$portmap' => 18, '$remote_fs' => 21, '$syslog' => 10, '$time' => 0, ); # Read in all meta-init scripts my @metainit_files = <$metainit_path/*.metainit>; my %metainits; for my $metainit_file (@metainit_files) { my $data = MetaInit::Parse::parse({ filename => $metainit_file }); $metainits{$data->{Name}} = $data; } # Locate existing scripts # We check for existing scripts only in /etc/rc2.d my %startscripts; for my $rc_file (<$etc/rc2.d/S??*>) { my ($num, $name) = $rc_file =~ m!S(\d\d)([^/]+)!; $startscripts{$name} = $num; } # Sort the scripts to existing and non-existing scripts my @existing; my @new; for my $metainit (keys %metainits) { if (exists $startscripts{$metainit}) { push @existing, $metainit; } else { push @new, $metainit; } } # Actually, we only want to treat the passed scripts as new @new = @new_scripts; # Check the dependencies for existing scripts for my $existing (@existing) { my @deps = @{$metainits{$existing}{"Required-Start"}}; for my $dep (@deps) { if (exists $startscripts{$dep}) { if ($startscripts{$dep} >= $startscripts{$existing}) { warn "Late dependency $dep of $existing.\n" } } elsif (exists $facilities{$dep}) { if ($facilities{$dep} >= $startscripts{$existing}) { warn "Late facility $dep of $existing.\n" } } elsif (not exists $startscripts{$dep}){ # Nothing to do here } else { warn "Unkown dependency $dep of $existing.\n"; } } } my @processed = (); while (@new > 0) { # Check Bounds my %lower; my %upper; for my $existing (@existing) { my @deps = @{$metainits{$existing}{"Required-Start"}}; for my $dep (@deps) { if (exists $startscripts{$dep}){ $upper{$dep} = min($startscripts{$existing}, $upper{$dep}) } } } for my $new (@new) { my @deps = @{$metainits{$new}{"Required-Start"}}; for my $dep (@deps) { if (not exists $startscripts{$dep}){ $lower{$new} = $startscripts{$dep}; $lower{$new} = max($startscripts{$dep}, $lower{$new}) } } } # Put a new scripts at appropriate location my $current = pop @new; # Standard case: if (($lower{$current}||0) > ($upper{$current}||99)) { warn "Could not correctly fit in $current, please reorder manually.\n"; $startscripts{$current} = $lower{$current}||10 + 10; push @processed, $current; push @existing, $current; } elsif (($lower{$current}||0 < 20) and not defined $upper{$current}) { $startscripts{$current} = 20; push @processed, $current; push @existing, $current; } else { $startscripts{$current} = mid($lower{$current}, $upper{$current}); } } for my $done (@processed) { printf "%s %02d\n", $done, $startscripts{$done} } sub max { return $_[1] if (defined $_[1] and $_[0] < $_[1]); return $_[0] } sub min { return $_[1] if (defined $_[1] and $_[0] > $_[1]); return $_[0] } sub mid { return sum(@_) / scalar @_; } # vim: sw=4:ts=4:expandtab metainit/utils/create-sysvinit-file0000755000175000017500000001032010636547615016521 0ustar jojojojo#!/usr/bin/perl -w # # Creates a sysvinit file from a metainit description. # # # Note that we’d like to adhere the LSB, so see # http://refspecs.freestandards.org/LSB_2.1.0/LSB-generic/LSB-generic/iniscrptact.html # use MetaInit::Parse; $filename = shift || die "Useage: $0 \n"; my $output = shift; # Parse the metainit in %initparams = %{MetaInit::Parse::parse({ filename => $filename })}; if ($output) { open(STDOUT,'>',$output) or die "Can't open '$output': $!"; } # Print the "dynamic" part of the initscript my $rl_start = join " ", @{$initparams{"Start-Levels"}}; my $rl_stop = join " ", @{$initparams{"Stop-Levels"}}; print << "EOF"; #! /bin/sh # # This a generated file. DO NOT EDIT THIS FILE! # If you want to modify how this file works, please # modify $filename and re-run update-metainit. # # If you are sure that you want to modify this file, # remove this comment, and update-metainit will not override # this script any more. # ### BEGIN INIT INFO # Provides: $initparams{"Name"} # Default-Start: $rl_start # Default-Stop: $rl_stop # Short-Description: $initparams{"Short-Description"} EOF print "# Required-Start: " . join(" ",@{$initparams{"Required-Start"}}) . "\n"; print "# Required-Stop: " . join(" ",@{$initparams{"Required-Stop"}}) . "\n"; print "# Description: "; print join("\n# ",split("\n",$initparams{"Description"})). "\n"; print "\n"; # prevent quoted strings from breaking the generated script: my %quoted_initparams; while (my ($k, $v) = each %initparams){ $quoted_initparams{$k} = quotemeta ($v || ''); } print << "EOF" ### END INIT INFO # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC=$quoted_initparams{"Short-Description"} NAME=$quoted_initparams{"Name"} DAEMON=$initparams{"Path"} BASENAME=$initparams{"Basename"} DAEMON_ARGS=$quoted_initparams{"Args"} PIDFILE=/var/run/\$NAME.pid SCRIPTNAME=/etc/init.d/\$NAME EOF ; # ... and the rest of the initscript, that is identical for all # metainit-created scripts. print << 'EOF' # Exit if the package is not installed [ -x "$DAEMON" ] || exit 5 # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # # Function that starts the daemon/service # do_start() { EOF ; if($initparams{"Prestart-Hook"}) { print "\t" . join("\n\t",split("\n",$initparams{"Prestart-Hook"})); print "\n"; } print << 'EOF' start-stop-daemon --start --oknodo --background --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_ARGS || return 1 } # # Function that stops the daemon/service # do_stop() { start-stop-daemon --stop --oknodo --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $BASENAME RETVAL="$?" rm -f $PIDFILE return $RETVAL EOF ; if($initparams{"Poststop-Hook"}) { print "\t" . join("\n\t",split("\n",$initparams{"Poststop-Hook"})); print "\n"; } print << 'EOF'; return "$RETVAL" } # # Function that sends a SIGHUP to the daemon/service # do_reload() { start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME return 0 } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" do_start log_end_msg $? ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop log_end_msg $? ;; #reload|force-reload) # # If do_reload() is not implemented then leave this commented out # and leave 'force-reload' as an alias for 'restart'. # #log_daemon_msg "Reloading $DESC" "$NAME" #do_reload #log_end_msg $? #;; restart|force-reload) # # If the "reload" option is implemented then remove the # 'force-reload' alias # log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0) do_start log_end_msg "$?" ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 3 ;; esac EOF if ($output) { close STDOUT; chmod 0755, $output or die "Can't change permissions for '$output': $!"; } # vim: ts=4:sw=4:expandtab metainit/lib/0000755000175000017500000000000010634571636012135 5ustar jojojojometainit/lib/MetaInit/0000755000175000017500000000000010763541104013635 5ustar jojojojometainit/lib/MetaInit/Parse.pm0000644000175000017500000001377510763540675015276 0ustar jojojojopackage MetaInit::Parse; use v5.008; use strict; use warnings; use Carp qw/croak/; use File::Basename; use Scalar::Util qw/openhandle/; =head1 NAME MetaInit::Parse - Parses a MetaInit definition fild =head1 SYNOPSIS $data = MetaInit::Parse::parse($filename) Opens and parses the specified file. The parsed data is handed back as a hashref, containing an entry for each definition. =head2 FILE FORMAT The file to be parsed should be in a RFC822-like format (field names and values are separated by a colon (C<:>). Lines starting with a blank are just appended to their previous line's value. Lines that contain only a period (C<.>) in them will become an empty line in the output. Empty lines are ignored. Comments are allowed - All characters after a # sign until the end of the line are ignored. If you need to include the # sign, prepend it with a backslash (\#). =head2 FIELDS A MetaInit file has several defined fields, out of which only C is mandatory: =over 4 =item Short-Description A short (~60 character) description of the daemon. Merely informative. =item Description A longer description of the daemon, usually a couple of lines long. Merely informative. =item Exec The command to execute to get the daemon to room. Please keep in mind this should start the daemon in the I, not send it to the background. =item Required-Start The facilities that should be started before this one. This can include the LSB facility names. It defaults to "B<$local_fs $network $remote_fs>. =item Required-Stop B =item Should-Start B =item Should-Stop B =item Prestart-Hook A shell snippet that should be included in the generated init script I the daemon is run =item Poststop-hook A shell snippet that should be included in the generated init script I the daemon finishes running =item No-Auto If this is set to anything, the generated init scripts will be installed in a way that the deamon is not started by default on system start up. It can still be started manually (e.g. using /etc/init.d/ start) and be configured to start automatically (e.g. by adjusting the symlinks). =back Some fields (Required-Start, Should-Start, Required-Stop and Should-Stop) will not return strings but arrayrefs - Elements will be separated by whitespace. =head1 NOTES Note that this module is written specifically for MetaInit, it will quite probably not be useful outside it. =head1 SEE ALSO The (as for now inexistent ;-) ) MetaInit documentation LSB facility names, http://refspecs.freestandards.org/LSB_2.1.0/LSB-generic/LSB-generic/facilname.html =head1 AUTHOR =cut my @splits = qw(Required-Start Should-Start Required-Stop Should-Stop); my @mandatory = qw(Exec); sub slurp_from_fh { my ($fh) = @_; return do { local $/; <$fh> }; } sub process_data { my ($data, $parsed) = @_; my $lastkey; for (split /\n/, $data) { chomp; # Ignore comments; unescape escaped #s s/[^\\]\#.*//; s/\\\#/\#/g; # Ignore empty lines; convert single dots in a line into empty lines next if /^\s*$/; s/^\s*\.\s*$//; if (my ($key, $value) = m/^(\S.*)\s*:\s*(.*)/) { $parsed->{$key} = $value; $lastkey = $key; } elsif ($lastkey) { s/^\s+//; s/^\.$//; $parsed->{$lastkey} .= "\n$_"; } else { die "Cannot parse line: ``$_''"; } } } sub fixup_results { my (%parsed) = @_; my $error_msg = ""; for my $field (@mandatory) { $error_msg .= "Mandatory field `$field' not provided\n" unless exists $parsed{$field}; } croak($error_msg) if $error_msg; if (not exists $parsed{Description}) { $parsed{Description} = $parsed{"Short-Description"} } ($parsed{Path}, $parsed{Args}) = split(/\s+/,$parsed{Exec},2); $parsed{Basename} = basename $parsed{Path}; for (@splits){ $parsed{$_} = [ split m/\s+/, $parsed{$_}||'' ]; } if ($parsed{"No-Auto"}) { $parsed{"Start-Levels"} = []; $parsed{"Stop-Levels"} = [1,2,3,4,5]; } else { $parsed{"Start-Levels"} = [2,3,4,5]; $parsed{"Stop-Levels"} = [1]; } if ($parsed{"Post-Stop"}) { push @{$parsed{"Stop-Levels"}}, 0, 6; } for (qw/Start-Levels Stop-Levels/) { @{$parsed{$_}} = sort @{$parsed{$_}}; } return %parsed; } sub parse { my ($args) = @_; if (ref $args ne 'HASH') { croak('hash reference expected'); } my $data; my %parsed; if (defined $args->{input}) { $data = $args->{input}; } elsif (my $fh = openhandle($args->{handle})) { $data = slurp_from_fh($fh); } elsif (defined (my $file = $args->{filename})) { open(my $handle, '<', $file) or die "Failed to open input file `$file': $!"; $data = slurp_from_fh($handle); $parsed{File} = $file; $parsed{Name} = basename($file,'.metainit'); } else { croak("no input given; you need to pass a `filename', " . "an opened `handle' or an `input' string"); } if (!defined $parsed{File}) { if (ref $args->{fields} ne 'HASH' || !exists $args->{fields}->{File} || !exists $args->{fields}->{Name}) { croak("parsing from handles or strings requires the `fields' option to " . "be set to a hash reference that defines both the `Name' and the " . "`File' field."); } } @parsed{keys %{ $args->{fields} }} = values %{ $args->{fields} }; # Defaults: $parsed{"Short-Description"} = $parsed{Name}; $parsed{"No-Auto"} = 0; $parsed{"Required-Start"} = '$local_fs $network $remote_fs'; $parsed{"Required-Stop"} = '$local_fs $network $remote_fs'; process_data($data, \%parsed); %parsed = fixup_results(%parsed); return \%parsed; } # Return a true value 1; # vim:sw=4:ts=4:expandtab metainit/t/0000755000175000017500000000000010636001536011617 5ustar jojojojometainit/t/00compile.t0000644000175000017500000000014310636001536013572 0ustar jojojojo#!perl use strict; use warnings; use Test::More tests => 1; BEGIN { use_ok('MetaInit::Parse'); } metainit/t/exception.t0000644000175000017500000000206310636001536014003 0ustar jojojojo#!perl use strict; use warnings; use Test::More tests => 7; use Test::NoWarnings; use Test::Exception; use MetaInit::Parse; throws_ok(sub { MetaInit::Parse::parse('foo'); }, qr/hash reference expected/, 'needs hash ref'); throws_ok(sub { MetaInit::Parse::parse({}); }, qr/no input given/, 'needs input'); throws_ok(sub { MetaInit::Parse::parse({ filename => 'something that\'s unlikely to exist' }); }, qr/Failed to open input file/, 'non-existant file'); throws_ok(sub { MetaInit::Parse::parse({ input => 'foo' }); }, qr/parsing from handles or strings/, 'parsing from string without passing File and Name fields'); lives_ok(sub { MetaInit::Parse::parse({ input => 'Exec: /foo/bar', fields => { File => '', Name => '', } }); }, 'parsing from strign with File and Name fields set'); throws_ok(sub { MetaInit::Parse::parse({ input => 'foo: bar', fields => { File => '', Name => '', } }); }, qr/Mandatory field .* not provided/, 'mandatory fields missing'); metainit/doc/0000755000175000017500000000000010635764237012136 5ustar jojojojometainit/doc/converting.txt0000644000175000017500000000351610635763244015057 0ustar jojojojo== How to convert to metainit == (Without using dh_metainit) * Write the Metainit file. You can find examples in /usr/share/doc/metainit/examples * Make the package with the init script depend on metainit (If you require a feature that was introduced later, make the Depends versioned) * Make sure your package installs the metainit file to /etc/metainit. * Make sure your packge does not install any file to init.d. * Add code compareable to the following to your postinst script: =================================================================== /usr/sbin/update-metainit >/dev/null if [ -x "/etc/init.d/infon-server" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d infon-server start || exit $? else if [ -x /etc/init.d/infon-server ]; then /etc/init.d/infon-server start || exit $? fi fi fi =================================================================== * Add code compareable to the following to your prerm script: =================================================================== if [ -x "/etc/init.d/infon-server" ]; then if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d infon-server stop || exit $? else /etc/init.d/infon-server stop || exit $? fi fi =================================================================== * Add code compareable to the following to your postrm script: =================================================================== if [ "$1" = "purge" -a -x /usr/sbin/update-metainit ] ; then /usr/sbin/update-metainit --remove infon-server --purge >/dev/null fi =================================================================== That should work. Of course, it’s easier to use dh_metainit: Then you just write the metainit file, add the dependency and dh_metainit will take care of the rest. metainit/debian/0000755000175000017500000000000010763541111012575 5ustar jojojojometainit/debian/dh-metainit.manpages0000644000175000017500000000001610636001052016504 0ustar jojojojodh_metainit.1 metainit/debian/metainit.dirs0000644000175000017500000000001610634574050015274 0ustar jojojojo/etc/metainit metainit/debian/metainit.docs0000644000175000017500000000000710635763432015270 0ustar jojojojodocs/* metainit/debian/copyright0000644000175000017500000000213710636010676014541 0ustar jojojojoThis is metainit, written and maintained by Joachim Breitner The original source can always be found at: ftp://ftp.debian.org/dists/unstable/main/source/ Copyright © 2007 Joachim Breitner With invaluable contributions from: * Florian Ragwitz * Gunnar Wolf * Moritz Lenz * Urs Ganse This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License with the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. metainit/debian/changelog0000644000175000017500000000161310763541064014457 0ustar jojojojometainit (0.0.5) unstable; urgency=low * Exec now "sees" all arguments (Closes: #468051) -- Joachim Breitner Wed, 05 Mar 2008 16:54:27 +0100 metainit (0.0.4) UNRELEASED; urgency=low * add XS-Vcs-Browser header -- Joachim Breitner Wed, 24 Oct 2007 00:54:58 +0200 metainit (0.0.3) unstable; urgency=low * manpage with confusing names (Closes: #435149) * Manpage refers to a non existing document (Closes: #435148) -- Joachim Breitner Mon, 30 Jul 2007 15:45:31 +0200 metainit (0.0.2) unstable; urgency=low * Upload to unstable, to be able to convert the first package -- Joachim Breitner Sat, 23 Jun 2007 13:26:11 +0100 metainit (0.0.1) UNRELEASED; urgency=low * Initial release for testing, not yet for the archive. -- Joachim Breitner Tue, 19 Jun 2007 18:12:22 +0100 metainit/debian/metainit.manpages0000644000175000017500000000002410636013625016123 0ustar jojojojo./update-metainit.1 metainit/debian/rules0000755000175000017500000000202510636013665013663 0ustar jojojojo#! /usr/bin/make -f # -*- makefile -*- # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 build: pod2man debhelper/dh_metainit > dh_metainit.1 pod2man update-metainit.pod update-metainit.1 clean: dh_testdir dh_testroot rm -f dh_metainit.1 rm -f update-metainit.1 dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # install # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installdocs dh_installexamples dh_installchangelogs dh_install dh_installman dh_compress dh_fixperms dh_installdeb dh_perl dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep .PHONY: build clean binary-indep binary-arch binary install metainit/debian/control0000644000175000017500000000175210707475736014226 0ustar jojojojoSource: metainit Section: admin Priority: optional Maintainer: Joachim Breitner Build-Depends: debhelper (>= 4.0.0) Standards-Version: 3.7.2 XS-Vcs-Darcs: http://darcs.nomeata.de/metainit XS-Vcs-Browser: http://darcs.nomeata.de/cgi-bin/darcsweb.cgi?r=metainit;a=summary Package: metainit Architecture: all Depends: ${perl:Depends} Description: Generates init scripts Metainit solves the problem of writing good init scripts. Instead of manually creating these important files, they are derived from a declaritive description in the metainit files in /etc/metainit. These files can be shipped with packages or created by the local administrator. Package: dh-metainit Architecture: all Depends: debhelper, ${perl:Depends} Description: Debhelper addon to install and register a metainit file This debhelper script should be used by package that ship an metainit file. It installs the metainit file in the right spot and add the required actions to the maintainer scripts. metainit/debian/metainit.install0000644000175000017500000000016010634775546016016 0ustar jojojojoutils /usr/share/metainit/ translators /usr/share/metainit/ update-metainit /usr/sbin lib/* /usr/share/perl5 metainit/debian/compat0000644000175000017500000000000210634571350014000 0ustar jojojojo5 metainit/debian/dh-metainit.install0000644000175000017500000000013010635765272016400 0ustar jojojojodebhelper/dh_metainit /usr/bin debhelper/autoscripts/* /usr/share/debhelper/autoscripts metainit/debian/metainit.examples0000644000175000017500000000001310635763363016156 0ustar jojojojoexamples/* metainit/local-test-bash-source0000644000175000017500000000024010636730273015562 0ustar jojojojo# Source this file using # . local-test-bash-source # to run the metainit scripts locally. export METAINIT_PREFIX="$PWD" export PERL5LIB="$PWD/lib:$PER5LIB" metainit/usr/0000755000175000017500000000000010634573570012177 5ustar jojojojometainit/usr/sbin/0000755000175000017500000000000010634602176013125 5ustar jojojojometainit/usr/sbin/update-rc.d0000755000175000017500000001442210634602176015164 0ustar jojojojo#! /usr/bin/perl # # update-rc.d Update the links in /etc/rc[0-9S].d/ # use strict; use warnings; # This is a locally modified version of /usr/sbin/update-rc.d to work in the local # directory, to use for testing purposes. my $initd = "$ENV{PWD}/etc/init.d"; my $etcd = "$ENV{PWD}/etc/rc"; my $notreally = 0; # Only parse the LSB headers when this flag exist. It is to be used # while we test this new feature, and should be removed when we are # confident that LSB headers are correct. [pere 2006-09-06] my $lsbparseflag = "/etc/update-rc.d-lsbparse"; # Print usage message and die. sub usage { print STDERR "update-rc.d: error: @_\n" if ($#_ >= 0); print STDERR < remove update-rc.d [-n] defaults [NN | sNN kNN] update-rc.d [-n] start|stop NN runlvl [runlvl] [...] . -n: not really -f: force EOF exit (1); } # Check out options. my $force; while($#ARGV >= 0 && ($_ = $ARGV[0]) =~ /^-/) { shift @ARGV; if (/^-n$/) { $notreally++; next } if (/^-f$/) { $force++; next } if (/^-h|--help$/) { &usage; } &usage("unknown option"); } # Action. &usage() if ($#ARGV < 1); my $bn = shift @ARGV; if ($ARGV[0] ne 'remove') { if (! -f "$initd/$bn") { print STDERR "update-rc.d: $initd/$bn: file does not exist\n"; exit (1); } } elsif (-f "$initd/$bn") { if (!$force) { printf STDERR "update-rc.d: $initd/$bn exists during rc.d purge (use -f to force)\n"; exit (1); } } my @startlinks; my @stoplinks; $_ = $ARGV[0]; if (/^remove$/) { &checklinks ("remove"); } elsif (/^defaults$/) { &defaults; &makelinks } elsif (/^(start|stop)$/) { &startstop; &makelinks; } else { &usage; } exit (0); # Check if there are links in /etc/rc[0-9S].d/ # Remove if the first argument is "remove" and the links # point to $bn. sub is_link () { my ($op, $fn, $bn) = @_; if (! -l $fn) { print STDERR "update-rc.d: warning: $fn is not a symbolic link\n"; return 0; } else { my $linkdst = readlink ($fn); if (! defined $linkdst) { die ("update-rc.d: error reading symbolic link: $!\n"); } if (($linkdst ne "../init.d/$bn") && ($linkdst ne "$initd/$bn")) { print STDERR "update-rc.d: warning: $fn is not a link to ../init.d/$bn or $initd/$bn\n"; return 0; } } return 1; } sub checklinks { my ($i, $found, $fn, $islnk); print " Removing any system startup links for $initd/$bn ...\n" if (defined $_[0] && $_[0] eq 'remove'); $found = 0; foreach $i (0..9, 'S') { unless (chdir ("$etcd$i.d")) { next if ($i =~ m/^[789S]$/); die("update-rc.d: chdir $etcd$i.d: $!\n"); } opendir(DIR, "."); foreach $_ (readdir(DIR)) { next unless (/^[SK]\d\d$bn$/); $fn = "$etcd$i.d/$_"; $found = 1; $islnk = &is_link ($_[0], $fn, $bn); next unless (defined $_[0] and $_[0] eq 'remove'); if (! $islnk) { print " $fn is not a link to ../init.d/$bn; not removing\n"; next; } print " $etcd$i.d/$_\n"; next if ($notreally); unlink ("$etcd$i.d/$_") || die("update-rc.d: unlink: $!\n"); } closedir(DIR); } $found; } sub parse_lsb_header { my $initdscript = shift; my %lsbinfo; if (-e $lsbparseflag) { my $lsbfound = 0; my $lsbheaders = "Provides|Default-Start|Default-Stop"; open(INIT, "<$initdscript") || die "error: unable to read $initdscript"; while () { chomp; $lsbfound = 1 if (m/^\#\#\# BEGIN INIT INFO$/); last if (m/\#\#\# END INIT INFO$/); if (m/^\# (Default-Start|Default-stop):\s*(\S?.*)$/i) { $lsbinfo{lc($1)} = $2; } } close(INIT); } return %lsbinfo; } # Process the arguments after the "defaults" keyword. sub defaults { my ($start, $stop) = (20, 20); &usage ("defaults takes only one or two codenumbers") if ($#ARGV > 2); $start = $stop = $ARGV[1] if ($#ARGV >= 1); $stop = $ARGV[2] if ($#ARGV >= 2); &usage ("codenumber must be a number between 0 and 99") if ($start !~ /^\d\d?$/ || $stop !~ /^\d\d?$/); $start = sprintf("%02d", $start); $stop = sprintf("%02d", $stop); my %lsbinfo = parse_lsb_header("$initd/$bn"); if (exists $lsbinfo{'default-stop'}) { for my $level (split(/\s+/, $lsbinfo{'default-stop'})) { $level = 99 if ($level eq 'S'); $stoplinks[$level] = "K$stop"; } } else { $stoplinks[0] = $stoplinks[1] = $stoplinks[6] = "K$stop"; } if (exists $lsbinfo{'default-start'}) { for my $level (split(/\s+/, $lsbinfo{'default-start'})) { $level = 99 if ($level eq 'S'); $startlinks[$level] = "S$start"; } } else { $startlinks[2] = $startlinks[3] = $startlinks[4] = $startlinks[5] = "S$start"; } 1; } # Process the arguments after the start or stop keyword. sub startstop { my($letter, $NN, $level); while ($#ARGV >= 0) { if ($ARGV[0] eq 'start') { $letter = 'S'; } elsif ($ARGV[0] eq 'stop') { $letter = 'K' } else { &usage("expected start|stop"); } if ($ARGV[1] !~ /^\d\d?$/) { &usage("expected NN after $ARGV[0]"); } $NN = sprintf("%02d", $ARGV[1]); shift @ARGV; shift @ARGV; $level = shift @ARGV; do { if ($level !~ m/^[0-9S]$/) { &usage( "expected runlevel [0-9S] (did you forget \".\" ?)"); } if (! -d "$etcd$level.d") { print STDERR "update-rc.d: $etcd$level.d: no such directory\n"; exit(1); } $level = 99 if ($level eq 'S'); $startlinks[$level] = "$letter$NN" if ($letter eq 'S'); $stoplinks[$level] = "$letter$NN" if ($letter eq 'K'); } while (($level = shift @ARGV) ne '.'); &usage("action with list of runlevels not terminated by \`.'") if ($level ne '.'); } 1; } # Create the links. sub makelinks { my($t, $i); my @links; if (&checklinks) { print " System startup links for $initd/$bn already exist.\n"; exit (0); } print " Adding system startup for $initd/$bn ...\n"; # nice unreadable perl mess :) for($t = 0; $t < 2; $t++) { @links = $t ? @startlinks : @stoplinks; for($i = 0; $i <= $#links; $i++) { my $lvl = $i; $lvl = 'S' if ($i == 99); next if (!defined $links[$i] or $links[$i] eq ''); print " $etcd$lvl.d/$links[$i]$bn -> ../init.d/$bn\n"; next if ($notreally); symlink("../init.d/$bn", "$etcd$lvl.d/$links[$i]$bn") || die("update-rc.d: symlink: $!\n"); } } 1; } metainit/translators/0000755000175000017500000000000010763540501013731 5ustar jojojojometainit/translators/sysvinit0000755000175000017500000000722710635772326015571 0ustar jojojojo#!/usr/bin/perl use strict; use warnings; use MetaInit::Parse; my $prefix = ""; $prefix = $ENV{METAINIT_PREFIX} if $ENV{METAINIT_PREFIX}; my $metainit_dir = "$prefix/etc/metainit"; my $etc = "$prefix/etc"; my $updatercd = "$prefix/usr/sbin/update-rc.d"; my $metainit_base = "$prefix/usr/share/metainit"; $metainit_base = $ENV{METAINIT_PREFIX} if $ENV{METAINIT_PREFIX}; # # Rough plan of operation: # (Maybe: # Check all init files, find all generated ones, see if the metainit # file is missing and delete them then) # Check all metainit files, whether the init.d file is out of date. # If the init.d file was created, find a suitable rc2.d/ number and run update-rc. # use Getopt::Long; my $remove = ''; my $purge = 0; GetOptions( 'purge' => \$purge, 'remove-metainit=s' => \$remove ); if ($remove) { # Operation: Remove all geranted files for the given metainit name remove($remove, $purge) } else { if ($purge) { die "--purge only useful in conjunction with --remove.\n"; exit 1; } # Operation: Rebuild everything #check_orphaned_initscripts() my %metainits = read_metainits(); my @generated = (); foreach my $metainit (values %metainits) { my $created = regenerate_initscript($metainit); push @generated, $metainit->{Name} if $created; } my %arrangement = (); open(ARRANGE, '-|',"$metainit_base/utils/arrange-sysvinit",@generated) or die $!; while () { if (/^([\w\.-]+) (\d\d)$/){ $arrangement{$1} = $2; } else { die "Can't parse $_"; } } close ARRANGE; while (my ($initname,$num) = each %arrangement) { my %data = %{$metainits{$initname}}; system($updatercd, $initname, @{$data{"Start-Levels"}} ? ("start", $num, @{$data{"Start-Levels"}}, ".") : (), @{$data{"Stop-Levels"}} ? ("stop", $num, @{$data{"Stop-Levels"}}, ".") : () ); } } sub read_metainits{ my %metainits; for my $metainit_file (<$metainit_dir/*.metainit>) { my $parsed = MetaInit::Parse::parse({ filename => $metainit_file }); $metainits{$parsed->{Name}} = $parsed; } return %metainits; } sub regenerate_initscript { my ($metainit) = @_; my $initscript = init_script_file($metainit); my $new = not -e $initscript; if (not $new) { if (not may_modify($initscript)) { warn "Not overriding user-modified init script $initscript.\n"; return; } } else { # Here me might want to check if the file is up-to-date. # For now, we just override it always. } system("$metainit_base/utils/create-sysvinit-file", $metainit->{File}, $initscript); return $new; } sub may_modify { my $initscript = shift; if (-e $initscript) { return 0 if not -w $initscript; my $can_touch = 0; open INIT, '<', $initscript or die $!; while () { if (/DO NOT EDIT THIS FILE/) { $can_touch = 1; last; } } close INIT; return $can_touch; } else { return 1; } } sub init_script_file { my ($metainit) = @_; return init_script_filename($metainit->{Name}); } sub init_script_filename { my ($initname) = @_; return sprintf "%s/init.d/%s", $etc, $initname; } sub remove { my $initname = shift; my $purge = shift; # It seems that --remove without --purge is not good, because possible user # configuration in the form of rc syslinks will not be presered. We rather # leave the generated init script around until purge then. So do not call # --remove in postrm if not purging, and do call --remove --purge when purging. my $initscript = init_script_filename($initname); if (may_modify($initscript) || $purge) { warn "Removing init script $initscript\n"; unlink $initscript or warn $! if -e $initscript; system($updatercd, $initname, "remove"); } else { warn "Init script $initscript is modified, not removing.\n"; } } metainit/etc/0000755000175000017500000000000010634740630012132 5ustar jojojojometainit/etc/rc2.d/0000755000175000017500000000000010635772246013053 5ustar jojojojometainit/etc/rc2.d/K20decaf-workstation0000755000175000017500000000166110633744272016702 0ustar jojojojo#! /bin/sh # /etc/init.d/decaf-killd: start and stop the user timeout daemon. # # Based on skeleton 1.9.1 by Miquel van Smoorenburg . DAEMON=/usr/sbin/decaf-killd NAME=decaf-killd DESC="decaf session daemon" test -x $DAEMON || exit 0 #set -e case "$1" in start) echo -n "Starting $DESC: $NAME" start-stop-daemon --start --oknodo --quiet --exec $DAEMON echo "." ;; stop) echo -n "Stopping $DESC: $NAME" start-stop-daemon --stop --oknodo --quiet --exec $DAEMON echo "." ;; reload|force-reload) echo -n "Reloading $DESC configuration..." start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON echo "done." ;; restart) echo -n "Restarting $DESC: $NAME" start-stop-daemon --stop --oknodo --quiet --exec $DAEMON sleep 1 start-stop-daemon --start --quiet --exec $DAEMON echo "." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/S20openvpn0000755000175000017500000001077010633744272014754 0ustar jojojojo#!/bin/sh -e ### BEGIN INIT INFO # Provides: vpn # Required-Start: $network $local_fs # Required-Stop: $network $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Openvpn VPN service ### END INIT INFO # Original version by Robert Leslie # , edited by iwj and cs # Modified for openvpn by Alberto Gonzalez Iniesta # Modified for restarting / starting / stopping single tunnels by Richard Mueller test $DEBIAN_SCRIPT_DEBUG && set -v -x DAEMON=/usr/sbin/openvpn DESC="virtual private network daemon" CONFIG_DIR=/etc/openvpn test -x $DAEMON || exit 0 test -d $CONFIG_DIR || exit 0 # Source defaults file; edit that file to configure this script. AUTOSTART="all" STATUSREFRESH=10 if test -e /etc/default/openvpn ; then . /etc/default/openvpn fi start_vpn () { if grep -q '^[ ]*daemon' $CONFIG_DIR/$NAME.conf ; then # daemon already given in config file DAEMONARG= else # need to daemonize DAEMONARG="--daemon ovpn-$NAME" fi if grep -q '^[ ]*status ' $CONFIG_DIR/$NAME.conf ; then # status file already given in config file STATUSARG="" elif test $STATUSREFRESH -eq 0 ; then # default status file disabled in /etc/default/openvpn STATUSARG="" else # prepare default status file STATUSARG="--status /var/run/openvpn.$NAME.status $STATUSREFRESH" fi echo -n " $NAME" STATUS="OK" # Check to see if it's already started... if test -e /var/run/openvpn.$NAME.pid ; then STATUS="FAILED - Already running (PID file exists)" else $DAEMON --writepid /var/run/openvpn.$NAME.pid \ $DAEMONARG $STATUSARG --cd $CONFIG_DIR \ --config $CONFIG_DIR/$NAME.conf < /dev/null || STATUS="FAILED" fi echo -n "($STATUS)" } stop_vpn () { kill `cat $PIDFILE` || true rm $PIDFILE rm -f /var/run/openvpn.$NAME.status 2> /dev/null } case "$1" in start) echo -n "Starting $DESC:" # autostart VPNs if test -z "$2" ; then # check if automatic startup is disabled by AUTOSTART=none if test "x$AUTOSTART" = "xnone" -o -z "$AUTOSTART" ; then echo " Autostart disabled." exit 0 fi if test -z "$AUTOSTART" -o "x$AUTOSTART" = "xall" ; then # all VPNs shall be started automatically for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do NAME=${CONFIG%%.conf} start_vpn done else # start only specified VPNs for NAME in $AUTOSTART ; do if test -e $CONFIG_DIR/$NAME.conf ; then start_vpn else echo -n " (failure: No such VPN: $NAME)" fi done fi #start VPNs from command line else while shift ; do [ -z "$1" ] && break if test -e $CONFIG_DIR/$1.conf ; then NAME=$1 start_vpn else echo -n " (failure: No such VPN: $1)" fi done fi echo "." ;; stop) echo -n "Stopping $DESC:" if test -z "$2" ; then for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do NAME=`echo $PIDFILE | cut -c18-` NAME=${NAME%%.pid} stop_vpn echo -n " $NAME" done else while shift ; do [ -z "$1" ] && break if test -e /var/run/openvpn.$1.pid ; then PIDFILE=`ls /var/run/openvpn.$1.pid 2> /dev/null` NAME=`echo $PIDFILE | cut -c18-` NAME=${NAME%%.pid} stop_vpn echo -n " $NAME" else echo -n " (failure: No such VPN is running: $1)" fi done fi echo "." ;; # We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'. reload|force-reload) echo -n "Reloading $DESC:" for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do NAME=`echo $PIDFILE | cut -c18-` NAME=${NAME%%.pid} # If openvpn if running under a different user than root we'll need to restart if egrep '^( |\t)*user ' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then stop_vpn sleep 1 start_vpn echo -n "(restarted)" else kill -HUP `cat $PIDFILE` || true echo -n " $NAME" fi done echo "." ;; restart) shift $0 stop ${@} sleep 1 $0 start ${@} ;; cond-restart) echo -n "Restarting $DESC:" for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do NAME=`echo $PIDFILE | cut -c18-` NAME=${NAME%%.pid} stop_vpn sleep 1 start_vpn done echo "." ;; *) echo "Usage: $0 {start|stop|reload|restart|force-reload|cond-restart}" >&2 exit 1 ;; esac exit 0 # vim:set ai sts=2 sw=2 tw=0: metainit/etc/rc2.d/S22dbus0000755000175000017500000001011210633744272014214 0ustar jojojojo#! /bin/sh ### BEGIN INIT INFO # Provides: dbus # Required-Start: $local_fs $syslog # Required-Stop: $local_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: D-Bus systemwide message bus # Description: D-Bus is a simple interprocess messaging system, used # for sending messages between applications. ### END INIT INFO # -*- coding: utf-8 -*- # Debian init.d script for D-BUS # Copyright © 2003 Colin Walters # Copyright © 2005 Sjoerd Simons set -e DAEMON=/usr/bin/dbus-daemon UUIDGEN=/usr/bin/dbus-uuidgen UUIDGEN_OPTS=--ensure NAME=dbus DAEMONUSER=messagebus PIDDIR=/var/run/dbus PIDFILE=$PIDDIR/pid DESC="system message bus" EVENTDIR=/etc/dbus-1/event.d test -x $DAEMON || exit 0 . /lib/lsb/init-functions # Source defaults file; edit that file to configure this script. ENABLED=1 PARAMS="" if [ -e /etc/default/dbus ]; then . /etc/default/dbus fi test "$ENABLED" != "0" || exit 0 create_machineid() { # Create machine-id file if [ -x $UUIDGEN ]; then $UUIDGEN $UUIDGEN_OPTS fi } dependent_services() { # Do nothing if we are called by init [ ! -z $runlevel ] && return # Determine current runlevel r=$(/sbin/runlevel) || true r=${r#*\ } # Do nothing if we can't determine the runlevel (e.g. inside chroots) [ "$r" = "unknown" ] && return if [ "$1" = "stop" ] ; then param="--reverse" action="stop" else param="" action="start" fi # Get the list of services active in this runlevel if [ -d /etc/rc${r}.d/ ] ; then # sysv-rc services=$(grep -l "^# Required-Start:.*dbus" /etc/rc${r}.d/S??* | sort $param) elif [ -f /etc/runlevel.conf ] ; then # file-rc list=$(grep -l "^# Required-Start:.*dbus" /etc/init.d/*) services=$( for i in $list ; do grep -E "^[[:digit:]]{2}[[:space:]]+([0-9,S]+|[-])[[:space:]]+.*$r.*[[:space:]]+$i$" /etc/runlevel.conf done | sort $param | awk '{print $4}' ) else services="" log_warning_msg "Unable to determine dependent services: unknown init system" fi # Start the services in the correct order for i in $services ; do service=$(basename $i) service=${service#S??} invoke-rc.d $service $action done } start_it_up() { if [ ! -d $PIDDIR ]; then mkdir -p $PIDDIR chown $DAEMONUSER $PIDDIR chgrp $DAEMONUSER $PIDDIR fi if [ -e $PIDFILE ]; then PIDDIR=/proc/$(cat $PIDFILE) if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then log_success_msg "$DESC already started; not starting." return else log_success_msg "Removing stale PID file $PIDFILE." rm -f $PIDFILE fi fi create_machineid log_daemon_msg "Starting $DESC" "$NAME" start-stop-daemon --start --quiet --pidfile $PIDFILE \ --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS log_end_msg $? if [ -d $EVENTDIR ]; then run-parts --arg=start $EVENTDIR || true fi dependent_services start } shut_it_down() { dependent_services stop if [ -d $EVENTDIR ]; then run-parts --reverse --arg=stop $EVENTDIR || true fi log_daemon_msg "Stopping $DESC" "$NAME" start-stop-daemon --stop --retry 60 --quiet --oknodo --pidfile $PIDFILE \ --user $DAEMONUSER # We no longer include these arguments so that start-stop-daemon # can do its job even given that we may have been upgraded. # We rely on the pidfile being sanely managed # --exec $DAEMON -- --system $PARAMS log_end_msg $? rm -f $PIDFILE } reload_it() { create_machineid log_action_begin_msg "Reloading $DESC config" dbus-send --print-reply --system --type=method_call \ --dest=org.freedesktop.DBus \ / org.freedesktop.DBus.ReloadConfig > /dev/null # hopefully this is enough time for dbus to reload it's config file. log_action_end_msg $? } case "$1" in start) start_it_up ;; stop) shut_it_down ;; reload|force-reload) reload_it ;; restart) shut_it_down start_it_up ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload}" >&2 exit 2 ;; esac exit 0 metainit/etc/rc2.d/S00bootsplash0000755000175000017500000000603510633744272015442 0ustar jojojojo#!/bin/sh ### BEGIN INIT INFO # Provides: bootsplash # Required-Start: $remote_fs # Required-Stop: # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: # Description: Boot Splash screen setup ### END INIT INFO # based on initscript from gentoo linux # made some changes to fit normal sysvinit like used by debian # everything in here is GPL ;) # tcs@double-action.org SCRIPTNAME='/etc/init.d/bootsplash' # Only do this if the kernel has support [ -r /proc/splash ] || exit 0 # Only do this if 'splash' exists SPLASHBIN=$(which splash) || exit 0 # Only do this if 'fbresolution' exists FBRES=$(which fbresolution) || exit 0 # source our config [ -r /etc/default/bootsplash ] && . /etc/default/bootsplash # source rcS configuration variables [ -r /etc/default/rcS ] && . /etc/default/rcS . /lib/lsb/init-functions # default settings THEME="${THEME:-current}" BOOTSPLASH_TTYS="${BOOTSPLASH_TTYS:-$(seq 0 5)}" get_bootsplash_theme () { # try to get bootsplash theme from kernel command line CMDLINE=$(cat /proc/cmdline) ( echo $CMDLINE | grep -qe 'theme=.*' ) || return 1 for param in $CMDLINE; do if [ "${param%=*}" = "theme" ]; then THEME="${param#theme=}" return 0 fi done return 1 } set_bootsplash_image () { TTY="$1" [ -z "$TTY" ] && return 1 # get console resolution RESOLUTION=$($FBRES) # support for a different config per virtual terminal if [ -r /etc/bootsplash/themes/${THEME}/config/vtsplash-${TTY}-${RESOLUTION}.cfg ] then $SPLASHBIN -s -u $TTY -n /etc/bootsplash/themes/${THEME}/config/vtsplash-${TTY}-${RESOLUTION}.cfg return 0 elif [ -r /etc/bootsplash/themes/${THEME}/config/bootsplash-${RESOLUTION}.cfg ] then $SPLASHBIN -s -u $TTY -n /etc/bootsplash/themes/${THEME}/config/bootsplash-${RESOLUTION}.cfg return 0 fi return 1 } case "$1" in start) log_action_begin_msg "Setting Console frame buffer images" get_bootsplash_theme log_action_cont_msg "using theme '$THEME'" # switch to a usable image on all consoles for TTY in $(echo "${BOOTSPLASH_TTYS}" | sed -e 's# #\n#g') do set_bootsplash_image $TTY done log_action_end_msg 0 ;; stop) # Stop doesn't really stop, it actually changes the image # on vt1 back to the bootsplash image. CHVT_EXISTS='yes' CHVT=$(which chvt) || CHVT_EXISTS='no' log_action_begin_msg "Setting Console frame buffer images" get_bootsplash_theme log_action_cont_msg "using theme '$THEME'" $SPLASHBIN -s -u 0 /etc/bootsplash/themes/${THEME}/config/bootsplash-$(/sbin/fbresolution).cfg # ensure "silent" image is displayed echo "silent" > /proc/splash # switch to vt1 (must be &'d otherwise script hangs) [ "$CHVT_EXISTS" = 'yes' ] && ${CHVT} 1 & # print a nice message # /sbin/fbtruetype ........ log_action_end_msg 0 ;; restart|force-reload) : ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|force-restart}" >&2 exit 3 ;; esac : metainit/etc/rc2.d/S17ifplugd0000755000175000017500000000652710633744272014734 0ustar jojojojo#!/bin/bash # $Id: ifplugd.init.in 43 2003-09-13 11:25:11Z lennart $ # This file is part of ifplugd. # # ifplugd is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your # option) any later version. # # ifplugd is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with ifplugd; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. # ifplugd Brings up/down network automatically # # chkconfig: 2345 11 89 # description: Brings networks interfaces up and down automatically when \ # the cable is removed / inserted # # processname: /usr/sbin/ifplugd # config: /etc/ifplugd/ifplugd.conf ### BEGIN INIT INFO # Provides: ifplugd # Required-Start: $network # X-UnitedLinux-Should-Start: # Required-Stop: $network # X-UnitedLinux-Should-Stop: $ # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: ifplugd daemon providing # Description: Start ifplugd to allow XY and provide YZ # continued on second line by '#' # should contain enough info for the runlevel editor # to give admin some idea what this service does and # what it's needed for ... # (The Short-Description should already be a good hint.) ### END INIT INFO CFG=/etc/default/ifplugd IFPLUGD=/usr/sbin/ifplugd test -x $IFPLUGD || exit 0 if [ `id -u` != "0" ] && [ "$1" = "start" -o "$1" = "stop" ] ; then echo "You must be root to start, stop or restart ifplugd." exit 1 fi [ -f $CFG ] && . $CFG VERB="$1" shift [ $# -ne 0 ] && INTERFACES="$@" [ "x$INTERFACES" = "xauto" -o "x$INTERFACES" = "xall" ] && INTERFACES="`cat /proc/net/dev | awk '{ print $1 }' | egrep '^(eth|wlan)' | cut -d: -f1`" case "$VERB" in start) echo -n "Starting Network Interface Plugging Daemon:" for IF in $INTERFACES ; do IF1=$(echo $IF | sed "s/-/_/") A=$(eval echo \$\{ARGS_${IF1}\}) [ -z "$A" ] && A="$ARGS" $IFPLUGD -i $IF $A echo -n " $IF" done echo "." ;; stop) echo -n "Stopping Network Interface Plugging Daemon:" for IF in $INTERFACES ; do $IFPLUGD -k --wait-on-kill -i $IF echo -n " $IF" done echo "." ;; status) for IF in $INTERFACES ; do $IFPLUGD -c -i $IF done ;; suspend) echo -n "Suspending Network Interface Plugging Daemon:" for IF in $INTERFACES ; do $IFPLUGD -S -i $IF echo -n " $IF" done echo "." ;; resume) echo -n "Resuming Network Interface Plugging Daemon:" for IF in $INTERFACES ; do $IFPLUGD -R -i $IF echo -n " $IF" done echo "." ;; force-reload|restart) $0 stop $INTERFACES sleep 3 $0 start $INTERFACES ;; *) echo "Usage: $0 {start|stop|restart|force-reload|status|suspend|resume}" exit 1 esac exit 0 metainit/etc/rc2.d/S99stop-bootlogd0000755000175000017500000000101010633744272016066 0ustar jojojojo#! /bin/sh ### BEGIN INIT INFO # Provides: stop-bootlogd # Required-Start: $remote_fs rmnologin # Required-Stop: # Default-Start: 1 2 3 4 5 # Default-Stop: # Short-Description: Stop bootlogd # Description: See the bootlogd script ### END INIT INFO NAME=stop-bootlogd DAEMON=/sbin/bootlogd [ -x "$DAEMON" ] || exit 0 case "$1" in start) /etc/init.d/bootlogd stop ;; stop|restart|force-reload) # No-op ;; *) echo "Usage: $NAME {start|stop|restart|force-reload}" >&2 exit 3 ;; esac : metainit/etc/rc2.d/S20laptop-mode0000755000175000017500000000404010633744272015501 0ustar jojojojo#!/bin/sh # # chkconfig: - 20 90 # description: Starts and stops "laptop-mode" - tweaks system behavior # to extend battery life. # # config: /etc/laptop-mode/laptop-mode.conf ### BEGIN INIT INFO # Provides: laptop-mode # Should-Start: $all # Required-Start: $local_fs # Required-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Enable laptop-mode-tools power management functions # Description: Enable laptop-mode-tools power management functions ### END INIT INFO test -f /usr/sbin/laptop_mode || exit 0 . /lib/lsb/init-functions # Enable laptop mode when the system is booted when running on battery. TEMPFILE=`mktemp` echo "Failed to start laptop mode" > $TEMPFILE trap "log_action_end_msg 10 $( cat $TEMPFILE ) ; rm $TEMPFILE; exit 10" HUP INT ABRT QUIT SEGV TERM set -e case $1 in start) log_action_begin_msg "Enabling laptop mode" touch /var/run/laptop-mode-enabled /usr/sbin/laptop_mode auto > $TEMPFILE log_action_end_msg 0 $( cat $TEMPFILE ) ;; restart|reload|force-reload) log_action_begin_msg "Disabling laptop mode" # Full restart: first stop laptop mode completely (to restore default mount options etc.) rm -f /var/run/laptop-mode-enabled /usr/sbin/laptop_mode stop > $TEMPFILE log_action_end_msg 0 $( cat $TEMPFILE ) log_action_begin_msg "Enabling laptop mode" # Now remove files containing stored status, re-enable, and start it up again. rm -f /var/run/laptop-mode-* touch /var/run/laptop-mode-enabled /usr/sbin/laptop_mode auto force > $TEMPFILE log_action_end_msg 0 $( cat $TEMPFILE ) ;; stop) log_action_begin_msg "Disabling laptop mode" rm -f /var/run/laptop-mode-enabled /usr/sbin/laptop_mode stop > $TEMPFILE log_action_end_msg 0 $( cat $TEMPFILE ) ;; status) echo "Laptop mode status:" echo /usr/sbin/laptop_mode status ;; *) echo "Usage: $0 {stop|start|restart|reload|force-reload|status}" >&2 exit 2 ;; esac exit 0 metainit/etc/rc2.d/K20lighttpd0000755000175000017500000000305610633744272015075 0ustar jojojojo#!/bin/sh ### BEGIN INIT INFO # Provides: lighttpd # Required-Start: networking # Required-Stop: networking # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start the lighttpd web server. ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/lighttpd NAME=lighttpd DESC="web server" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME DAEMON_OPTS="-f /etc/lighttpd/lighttpd.conf" test -x $DAEMON || exit 0 set -e . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting $DESC" $NAME if ! start-stop-daemon --start --quiet\ --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS ; then log_end_msg 1 else log_end_msg 0 fi ;; stop) log_daemon_msg "Stopping $DESC" $NAME if start-stop-daemon --quiet --stop --oknodo --retry 30\ --pidfile $PIDFILE --exec $DAEMON; then rm -f $PIDFILE log_end_msg 0 else log_end_msg 1 fi ;; reload) log_daemon_msg "Reloading $DESC configuration" $NAME if start-stop-daemon --stop --signal 2 --oknodo --retry 30\ --quiet --pidfile $PIDFILE --exec $DAEMON; then if start-stop-daemon --start --quiet \ --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS ; then log_end_msg 0 else log_end_msg 1 fi else log_end_msg 1 fi ;; restart|force-reload) $0 stop [ -r $PIDFILE ] && while pidof lighttpd |\ grep -q `cat $PIDFILE 2>/dev/null` 2>/dev/null ; do sleep 1; done $0 start ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/S24avahi-daemon0000755000175000017500000000512510633744272015622 0ustar jojojojo#!/bin/sh ### BEGIN INIT INFO # Provides: avahi # Required-Start: $local_fs dbus # Required-Stop: $local_fs dbus # Should-Start: $syslog # Should-Stop: $syslog # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: Avahi mDNS/DNS-SD Daemon # Description: Zeroconf daemon for configuring your network # automatically ### END INIT INFO #set -e PATH=/sbin:/bin:/usr/sbin:/usr/bin DESC="Avahi mDNS/DNS-SD Daemon" NAME="avahi-daemon" DAEMON="/usr/sbin/$NAME" SCRIPTNAME=/etc/init.d/$NAME # Gracefully exit if the package has been removed. test -x $DAEMON || exit 0 . /lib/lsb/init-functions # don't start if /etc/default/avahi-daemon says so. AVAHI_DAEMON_START=1 test -f /etc/default/avahi-daemon && . /etc/default/avahi-daemon DISABLE_TAG="/var/run/avahi-daemon/disabled-for-unicast-local" if [ "$AVAHI_DAEMON_START" != "1" -a "$1" != "stop" ]; then log_warning_msg "Not starting $DESC $NAME, disabled via /etc/default/$NAME" exit 0 fi # # Function that starts the daemon/service. # d_start() { modprobe capability >/dev/null 2>&1 || true $DAEMON -c && return 0 if [ -e ${DISABLE_TAG} ]; then # Disabled because of the existance of an unicast .local domain log_warning_msg "avahi-daemon disabled because there is a unicast .local domain" exit 0; fi; if [ -s /etc/localtime ]; then if [ ! -d /etc/avahi/etc ]; then mkdir -p /etc/avahi/etc >/dev/null 2>&1 fi cp -fp /etc/localtime /etc/avahi/etc >/dev/null 2>&1 fi; $DAEMON -D } # # Function that stops the daemon/service. # d_stop() { if $DAEMON -c ; then $DAEMON -k fi } # # Function that reload the config file for the daemon/service. # d_reload() { $DAEMON -c && $DAEMON -r } # # Function that check the status of the daemon/service. # d_status() { $DAEMON -c && echo "$DESC is running" || echo "$DESC is not running" } case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" d_start log_end_msg $? ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" d_stop log_end_msg $? ;; reload) log_daemon_msg "Reloading services for $DESC" "$NAME" d_reload log_end_msg $? ;; restart|force-reload) log_daemon_msg "Restarting $DESC" "$NAME" $DAEMON -c && d_stop d_start log_end_msg $? ;; status) d_status ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|reload}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/S99rmnologin0000755000175000017500000000174210633744272015312 0ustar jojojojo#! /bin/sh ### BEGIN INIT INFO # Provides: rmnologin # Required-Start: $local_fs $remote_fs $all # Required-Stop: # Should-Start: kdm xdm gdm $syslog # Default-Start: 1 2 3 4 5 # Default-Stop: # Short-Description: Remove /etc/nologin at boot # Description: This script removes the /etc/nologin file as the # last step in the boot process, if DELAYLOGIN=yes. # If DELAYLOGIN=no, /etc/nologin was not created by # bootmisc earlier in the boot process. ### END INIT INFO PATH=/sbin:/bin [ "$DELAYLOGIN" ] || DELAYLOGIN=yes . /lib/init/vars.sh do_start () { # # If login delaying is enabled then remove the flag file # case "$DELAYLOGIN" in Y*|y*) rm -f /var/lib/initscripts/nologin ;; esac } case "$1" in start) do_start ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) # No-op ;; *) echo "Usage: $0 start|stop" >&2 exit 3 ;; esac : metainit/etc/rc2.d/README0000644000175000017500000000105410633744272013727 0ustar jojojojoThe scripts in this directory are executed each time the system enters this runlevel. The scripts are all symbolic links whose targets are located in /etc/init.d/ . To disable a service in this runlevel, rename its script in this directory so that the new name begins with a 'K' and a two-digit number, where the number is the difference between the two-digit number following the 'S' in its current name, and 100. To re-enable the service, rename the script back to its original name beginning with 'S'. For a more information see /etc/init.d/README. metainit/etc/rc2.d/S20acpid0000755000175000017500000000624610633744272014352 0ustar jojojojo#! /bin/sh -e ### BEGIN INIT INFO # Provides: acpid # Required-Start: $syslog # Required-Stop: $syslog # Should-Start: $local_fs # Should-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start the Advanced Configuration and Power Interface daemon # Description: Provide a socket for X11, hald and others to multiplex # kernel ACPI events. ### END INIT INFO # Check for daemon presence test -x /usr/sbin/acpid || exit 0 # Check for ACPI support on kernel side [ -d /proc/acpi ] || exit 0 # Include acpid defaults if available OPTIONS="" if [ -f /etc/default/acpid ] ; then . /etc/default/acpid fi # Get lsb functions . /lib/lsb/init-functions . /etc/default/rcS if [ "x$VERBOSE" = "xno" ]; then MODPROBE_OPTIONS="$MODPROBE_OPTIONS -q" export MODPROBE_OPTIONS fi # As the name says. If the kernel supports modules, it'll try to load # the ones listed in "MODULES". load_modules() { LIST=`/sbin/lsmod|awk '!/Module/ {print $1}'` # Get list of available modules LOC="/lib/modules/`uname -r`/kernel/drivers/acpi" if [ -d $LOC ]; then MODAVAIL=`( find $LOC -type f -name "*.o" -printf "basename %f .o\n"; \ find $LOC -type f -name "*.ko" -printf "basename %f .ko\n" ) | /bin/sh` else MODAVAIL="" fi if [ "$MODULES" = "all" ]; then MODULES="$MODAVAIL" fi if [ -n "$MODULES" ]; then log_begin_msg "Loading ACPI modules..." STATUS=0 for mod in $MODULES; do echo $MODAVAIL | grep -q -w "$mod" || continue if echo $LIST | grep -q -w "$mod"; then [ "$VERBOSE" != no ] && log_success_msg "Module already loaded: $mod" else if modprobe $mod 2>/dev/null; then [ "$VERBOSE" != no ] && log_success_msg "Loaded module: $mod" else if [ "$VERBOSE" != no ]; then log_warning_msg "Unable to load module: $mod" fi fi fi done log_end_msg $STATUS fi } case "$1" in start) [ -f /proc/modules ] && load_modules log_begin_msg "Starting Advanced Configuration and Power Interface daemon..." start-stop-daemon --start --quiet --exec /usr/sbin/acpid -- -c /etc/acpi/events $OPTIONS log_end_msg $? ;; stop) log_begin_msg "Stopping Advanced Configuration and Power Interface daemon..." start-stop-daemon --stop --quiet --oknodo --retry 2 --exec /usr/sbin/acpid log_end_msg $? ;; restart) $0 stop sleep 1 $0 start ;; reload|force-reload) log_begin_msg "Reloading Advanced Configuration and Power Interface daemon configuration files..." start-stop-daemon --stop --signal 1 --exec /usr/sbin/acpid log_end_msg $? ;; *) log_success_msg "Usage: /etc/init.d/acpid {start|stop|restart|reload|force-reload}" exit 1 esac exit 0 metainit/etc/rc2.d/S20wparoamd0000755000175000017500000000725010633744272015100 0ustar jojojojo#!/bin/sh # Buyer beware! This is really only useful if you want to use # wpasupplicant in roaming mode. # # PLEASE READ /usr/share/doc/wpasupplicant/README.modes for # details of the modes of operation of wpasupplicant. # # To activate the wpasupplicant daemon, set ENABLE_ROAMING_MODE to 1 ENABLE_ROAMING_MODE=1 # Location of the wpa_supplicant.conf configuration file to be used # by the daemon. # # See the wpa_supplicant.conf(5) manpage for detailed information # about the wpa_supplicant configuration file. Example configuration # files are located at /usr/share/doc/wpasupplicant/examples. # # Failure to set CONFIG to the full pathname of your configuration # file will cause the daemon to exit immediately. CONFIG="/etc/wpa_supplicant.conf" # Specify the network interface that the daemon will attach to. # # Examples: INTERFACE="eth1" # INTERFACE="ath0" # # Failure to set INTERFACE to a valid network interface name will # cause the daemon to fail or exit immediately. INTERFACE="ath0" # DRIVER specifies the driver type of the interface defined above. # # If DRIVER is not set, the daemon will default to the "wext" driver # # Currently, the following drivers are supported: # hostap = Host AP driver (Intersil Prism2/2.5/3) # madwifi = MADWIFI 802.11 support (Atheros, etc.) # atmel = ATMEL AT76C5XXx (USB, PCMCIA) # wext = Linux wireless extensions (generic, ipw2100/2200/3495, linux >= 2.6.14) # ndiswrapper = Linux ndiswrapper # ipw = Intel ipw2100/2200 driver (linux kernels 2.6.13 or older only) # wired = wpa_supplicant wired Ethernet driver DRIVER="madwifi" # End user defined section PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON="/sbin/wpa_supplicant" PNAME="wpa_supplicant" # exit silently if daemon is not installed/executable [ -x $DAEMON ] || exit 0 if [ "$ENABLE_ROAMING_MODE" = "0" ]; then exit 0; fi if [ -z "$INTERFACE" ]; then echo "No INTERFACE was defined, not starting."; exit 1; fi if [ ! -r "$CONFIG" ]; then echo "No configuration file found, not starting."; exit 1; fi if [ -z "$DRIVER" ]; then echo "No DRIVER was defined, not starting."; exit 1; fi # the pidfile name is important for avoiding unwanted interactions # with the wpasupplicant pre-up script PIDFILE="/var/run/wpa_supplicant.$INTERFACE.pid" OPTIONS="-B -w -i $INTERFACE -D $DRIVER -c $CONFIG -P $PIDFILE" set -e case "$1" in start) if [ -f "$PIDFILE" ]; then echo "$PNAME not starting, $PIDFILE already exists." exit 1 fi echo "Starting $PNAME." start-stop-daemon --start --name $PNAME \ --oknodo --startas $DAEMON -- $OPTIONS ;; stop) echo "Stopping $PNAME." start-stop-daemon --stop --name $PNAME \ --oknodo if [ -f "$PIDFILE" ]; then rm -f $PIDFILE; fi ;; reload|force-reload) echo "Reloading $PNAME." start-stop-daemon --stop --signal HUP \ --name $PNAME ;; restart) echo "Stopping $PNAME." start-stop-daemon --stop --name $PNAME \ --oknodo if [ -f "$PIDFILE" ]; then rm -f $PIDFILE; fi echo "Starting $PNAME." start-stop-daemon --start --name $PNAME \ --oknodo --startas $DAEMON -- $OPTIONS ;; *) echo "Usage: wpasupplicant {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/K20infon-server0000777000175000017500000000000010737205251021613 2../init.d/infon-serverustar jojojojometainit/etc/rc2.d/S24hal0000755000175000017500000000266210633744272014040 0ustar jojojojo#! /bin/sh ### BEGIN INIT INFO # Provides: hal # Required-Start: $local_fs dbus # Required-Stop: $local_fs dbus # Should-Start: $syslog acpid # Should-Stop: $syslog acpid # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: Hardware abstraction layer # Description: The HAL daemon collects and maintains information about # your hardware. ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/hald PIDDIR=/var/run/hal PIDFILE=$PIDDIR/hald.pid NAME=hald DAEMONUSER=haldaemon DESC="Hardware abstraction layer" . /lib/lsb/init-functions test -x $DAEMON || exit 0 # Include hal defaults if available if [ -f /etc/default/hal ] ; then . /etc/default/hal fi set -e do_start() { if [ ! -d $PIDDIR ]; then mkdir -p $PIDDIR chown $DAEMONUSER:$DAEMONUSER $PIDDIR fi start-stop-daemon --start --pidfile $PIDFILE \ --exec $DAEMON -- $DAEMON_OPTS } do_stop() { start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE \ --exec $DAEMON } case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" do_start log_end_msg $? ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" do_stop log_end_msg $? ;; restart|force-reload) log_daemon_msg "Restarting $DESC" "$NAME" do_stop sleep 1 do_start log_end_msg $? ;; *) log_success_msg "Usage: $0 {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/S20rsync0000755000175000017500000001000010633744272014407 0ustar jojojojo#! /bin/sh ### BEGIN INIT INFO # Provides: rsyncd # Required-Start: $network # Required-Stop: $syslog # Should-Start: $named $syslog # Should-Stop: $syslog network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: fast remote file copy program daemon # Description: rsync is a program that allows files to be copied to and # from remote machines in much the same way as rcp. # This provides rsyncd daemon functionality. ### END INIT INFO set -e # /etc/init.d/rsync: start and stop the rsync daemon DAEMON=/usr/bin/rsync RSYNC_ENABLE=false RSYNC_OPTS='' RSYNC_DEFAULTS_FILE=/etc/default/rsync RSYNC_CONFIG_FILE=/etc/rsyncd.conf RSYNC_NICE_PARM='' test -x $DAEMON || exit 0 . /lib/lsb/init-functions . /etc/default/rcS if [ -s $RSYNC_DEFAULTS_FILE ]; then . $RSYNC_DEFAULTS_FILE case "x$RSYNC_ENABLE" in xtrue|xfalse) ;; xinetd) exit 0 ;; *) log_failure_msg "Value of RSYNC_ENABLE in $RSYNC_DEFAULTS_FILE must be either 'true' or 'false';" log_failure_msg "not starting rsync daemon." exit 1 ;; esac case "x$RSYNC_NICE" in x[0-9]) RSYNC_NICE_PARM="--nicelevel $RSYNC_NICE";; x[1-9][0-9]) RSYNC_NICE_PARM="--nicelevel $RSYNC_NICE";; x) ;; *) log_warning_msg "Value of RSYNC_NICE in $RSYNC_DEFAULTS_FILE must be a value between 0 and 19 (inclusive);" log_warning_msg "ignoring RSYNC_NICE now." ;; esac fi export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" case "$1" in start) if "$RSYNC_ENABLE"; then log_daemon_msg "Starting rsync daemon" "rsync" if [ -s /var/run/rsync.pid ] && kill -0 $(cat /var/run/rsync.pid) >/dev/null 2>&1; then log_progress_msg "apparently already running" log_end_msg 0 exit 0 fi if [ ! -s "$RSYNC_CONFIG_FILE" ]; then log_failure_msg "missing or empty config file $RSYNC_CONFIG_FILE" log_end_msg 1 exit 1 fi start-stop-daemon --start --quiet --background \ --pidfile /var/run/rsync.pid --make-pidfile \ $RSYNC_NICE_PARM --exec /usr/bin/rsync \ -- --no-detach --daemon --config "$RSYNC_CONFIG_FILE" $RSYNC_OPTS log_end_msg $? else if [ -s "$RSYNC_CONFIG_FILE" ]; then [ "$VERBOSE" != no ] && log_warning_msg "rsync daemon not enabled in /etc/default/rsync, not starting..." fi fi ;; stop) log_daemon_msg "Stopping rsync daemon" "rsync" start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/rsync.pid log_end_msg $? rm -f /var/run/rsync.pid ;; reload|force-reload) log_warning_msg "Reloading rsync daemon: not needed, as the daemon" log_warning_msg "re-reads the config file whenever a client connects." ;; restart) set +e if $RSYNC_ENABLE; then log_daemon_msg "Restarting rsync daemon" "rsync" if [ -s /var/run/rsync.pid ] && kill -0 $(cat /var/run/rsync.pid) >/dev/null 2>&1; then start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/rsync.pid || true sleep 1 else rm -f /var/run/rsync.pid fi if start-stop-daemon --start --quiet --background \ --pidfile /var/run/rsync.pid --make-pidfile \ $RSYNC_NICE_PARM --exec /usr/bin/rsync \ -- --no-detach --daemon --config "$RSYNC_CONFIG_FILE" $RSYNC_OPTS then log_end_msg 0 else log_end_msg 1 rm -f /var/run/rsync.pid fi else [ "$VERBOSE" != no ] && log_warning_msg "rsync daemon not enabled in /etc/default/rsync, not starting..." fi ;; *) echo "Usage: /etc/init.d/rsync {start|stop|reload|force-reload|restart}" exit 1 esac exit 0 metainit/etc/rc2.d/S20openbsd-inetd0000755000175000017500000000442410633744272016021 0ustar jojojojo#!/bin/sh -e ### BEGIN INIT INFO # Provides: inetd # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Should-Start: $syslog # Should-Stop: $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start or stop the inetd daemon. ### END INIT INFO DAEMON=/usr/sbin/inetd [ -x $DAEMON -a -e /etc/inetd.conf ] || exit 0 [ -e /etc/default/openbsd-inetd ] && . /etc/default/openbsd-inetd . /lib/lsb/init-functions checkportmap () { if ! grep -v -s "^ *#" /etc/inetd.conf | grep -q -s 'rpc/'; then return 0 fi if [ ! -x /usr/bin/rpcinfo ]; then log_action_msg "WARNING: rpcinfo not available - RPC services may be unavailable!" log_action_msg " (Commenting out the rpc services in inetd.conf will" log_action_msg " disable this message)" elif ! /usr/bin/rpcinfo -u localhost portmapper >/dev/null 2>&1; then log_action_msg "WARNING: portmapper inactive - RPC services unavailable!" log_action_msg " (Commenting out the rpc services in inetd.conf will" log_action_msg " disable this message)" fi } checknoservices () { if ! grep -q "^[0-9A-Za-z/]" /etc/inetd.conf; then log_warning_msg "Not starting internet superserver: no services enabled." exit 0 fi } case "$1" in start) checknoservices checkportmap log_daemon_msg "Starting internet superserver" "inetd" start-stop-daemon --start --quiet --pidfile /var/run/inetd.pid \ --exec $DAEMON -- $OPTIONS log_end_msg 0 ;; stop) log_daemon_msg "Stopping internet superserver" "inetd" start-stop-daemon --stop --quiet --pidfile /var/run/inetd.pid \ --oknodo log_end_msg 0 ;; reload|force-reload) log_daemon_msg "Reloading internet superserver" "inetd" start-stop-daemon --stop --quiet --pidfile /var/run/inetd.pid \ --oknodo --signal 1 log_end_msg 0 ;; restart) checkportmap log_daemon_msg "Restarting internet superserver" "inetd" start-stop-daemon --stop --quiet --pidfile /var/run/inetd.pid \ --oknodo checknoservices sleep 1 start-stop-daemon --start --quiet --pidfile /var/run/inetd.pid \ --exec $DAEMON -- $OPTIONS log_end_msg 0 ;; *) echo "Usage: /etc/init.d/inetd {start|stop|reload|force-reload|restart}" exit 2 ;; esac exit 0 metainit/etc/rc2.d/K19postgresql-8.10000755000175000017500000000222410633744272015771 0ustar jojojojo#!/bin/sh -e ### BEGIN INIT INFO # Provides: postgresql postgresql-8.1 # Required-Start: $local_fs $network $time # Required-Stop: $local_fs $network $time # Should-Start: $syslog $remote_fs # Should-Stop: $syslog $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: PostgreSQL 8.1 RDBMS server ### END INIT INFO # Setting environment variables for the postmaster here does not work; please # set them in /etc/postgresql/8.1//environment instead. [ -r /usr/share/postgresql-common/init.d-functions ] || exit 0 . /usr/share/postgresql-common/init.d-functions VERSION=8.1 case "$1" in start) start $VERSION ;; stop) stop "$VERSION" ;; restart) restart "$VERSION" ;; force-reload | reload) reload $VERSION ;; status) status $VERSION ;; autovac-start) autovac_start $VERSION ;; autovac-stop) autovac_stop $VERSION ;; autovac-restart) autovac_restart $VERSION ;; *) echo "Usage: $0 {start|stop|restart|reload|force-reload|status|autovac-start|autovac-stop|autovac-restart}" exit 1 ;; esac exit 0 metainit/etc/rc2.d/S11klogd0000755000175000017500000000240510633744272014363 0ustar jojojojo#! /bin/sh # /etc/init.d/klogd: start the kernel log daemon. ### BEGIN INIT INFO # Provides: klogd # Required-Start: syslog # Required-Stop: syslog # Default-Start: S 1 2 3 4 5 # Default-Stop: 0 6 # Short-Description: Kernel logger ### END INIT INFO PATH=/bin:/usr/bin:/sbin:/usr/sbin pidfile=/var/run/klogd.pid binpath=/sbin/klogd test -f $binpath || exit 0 test ! -r /etc/default/klogd || . /etc/default/klogd . /lib/lsb/init-functions case "$1" in start) log_begin_msg "Starting kernel log daemon..." start-stop-daemon --start --quiet --pidfile $pidfile --name klogd --startas $binpath -- $KLOGD log_end_msg $? ;; stop) log_begin_msg "Stopping kernel log daemon..." start-stop-daemon --stop --retry TERM/1/TERM/1/TERM/4/KILL --quiet --pidfile $pidfile --name klogd log_end_msg $? ;; restart|force-reload) log_begin_msg "Reloading kernel log daemon..." start-stop-daemon --stop --retry TERM/1/TERM/1/TERM/4/KILL --quiet --pidfile $pidfile --name klogd start-stop-daemon --start --quiet --pidfile $pidfile --name klogd --startas $binpath -- $KLOGD log_end_msg $? ;; *) log_success_msg "Usage: /etc/init.d/klogd {start|stop|restart|force-reload}" exit 1 esac exit 0 metainit/etc/rc2.d/S21nfs-common0000755000175000017500000001252510633744272015344 0ustar jojojojo#!/bin/sh ### BEGIN INIT INFO # Provides: nfs-common # Required-Start: $time # Required-Stop: $time # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: NFS support files common to client and server # Description: NFS is a popular protocol for file sharing across # TCP/IP networks. This service provides various # support functions for NFS mounts. ### END INIT INFO # What is this? DESC="NFS common utilities" # Read config DEFAULTFILE=/etc/default/nfs-common PREFIX= NEED_IDMAPD= NEED_GSSD= PIPEFS_MOUNTPOINT=/var/lib/nfs/rpc_pipefs RPCGSSDOPTS= if [ -f $DEFAULTFILE ]; then . $DEFAULTFILE fi . /lib/lsb/init-functions # # Parse the fstab file, and determine whether we need idmapd and gssd. (The # /etc/defaults settings, if any, will override our autodetection.) This code # is partially adapted from the mountnfs.sh script in the sysvinit package. # AUTO_NEED_IDMAPD=no AUTO_NEED_GSSD=no if [ -f /etc/fstab ]; then exec 9<&0 /dev/null || true log_end_msg 0 ;; status) if ! pidof rpc.statd >/dev/null then echo "rpc.statd not running" exit 3 fi if [ "$NEED_GSSD" = yes ] then if ! pidof rpc.gssd >/dev/null then echo "rpc.statd running, but rpc.gssd halted" exit 3 fi fi if [ "$NEED_IDMAPD" = yes ] then if ! pidof rpc.idmapd >/dev/null then echo "rpc.statd running, but rpc.idmapd halted" exit 3 fi fi echo "rpc.statd running" exit 0 ;; restart | force-reload) $0 stop sleep 1 $0 start ;; *) log_success_msg "Usage: nfs-common {start|stop|status|restart}" exit 1 ;; esac exit 0 metainit/etc/rc2.d/S18xfs0000755000175000017500000001062410633744272014074 0ustar jojojojo#!/bin/sh # $Id: xfs.init 189 2005-06-11 00:04:27Z branden $ # Copyright 1998-2004 Branden Robinson . # # This is free software; you may redistribute it and/or modify # it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2, # or (at your option) any later version. # # This is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License with # the Debian operating system, in /usr/share/common-licenses/GPL; if # not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA ### BEGIN INIT INFO # Provides: xfs # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Should-Start: $network # Should-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 ### END INIT INFO set -e PATH=/bin:/usr/bin:/sbin:/usr/sbin DAEMON=/usr/bin/xfs PIDFILE=/var/run/xfs.pid UPGRADEFILE=/var/run/xfs.daemon-not-stopped SOCKET_DIR=/tmp/.font-unix test -x $DAEMON || exit 0 do_restorecon () { # Restore file security context (SELinux). if which restorecon >/dev/null 2>&1; then restorecon "$1" fi } set_up_socket_dir () { echo -n "Setting up X font server socket directory $SOCKET_DIR..." if [ -e $SOCKET_DIR ] && ! [ -d $SOCKET_DIR ]; then mv $SOCKET_DIR $SOCKET_DIR.$$ fi mkdir -p $SOCKET_DIR chown 0:0 $SOCKET_DIR chmod 1777 $SOCKET_DIR do_restorecon $SOCKET_DIR echo "done." } stillrunning () { if expr "$(cat /proc/$DAEMONPID/cmdline 2>/dev/null)" : "$DAEMON" >/dev/null \ 2>&1; then true else if [ -e $PIDFILE ]; then echo -n " (removing stale $PIDFILE)" rm $PIDFILE fi false fi } # If we have upgraded the daemon since we last started it, we can't use the # --exec argument to start-stop-daemon, because the daemon's inode will have # changed. The risk here is that in a situation where the daemon died, its # pidfile was not cleaned up, we've upgraded it, *and* some other process is now # running under that pid, start-stop-daemon will send signals to an innocent # process. However, this seems like a corner case. C'est la vie! if [ -e $UPGRADEFILE ]; then SSD_START_ARGS="--pidfile $PIDFILE --startas $DAEMON" SSD_STOP_ARGS="--pidfile $PIDFILE --name ${DAEMON#**/}" else SSD_START_ARGS="--pidfile $PIDFILE --exec $DAEMON" SSD_STOP_ARGS="$SSD_START_ARGS" fi case "$1" in start) set_up_socket_dir echo -n "Starting X font server: xfs" start-stop-daemon --start --quiet $SSD_START_ARGS -- -daemon \ || echo -n " already running" echo "." ;; restart) /etc/init.d/xfs stop if [ -f $PIDFILE ]; then if stillrunning; then exit 1 fi fi /etc/init.d/xfs start ;; reload) echo -n "Reloading X font server configuration..." if start-stop-daemon --stop --signal 1 --quiet $SSD_STOP_ARGS; then echo "done." else echo "xfs not running." fi ;; force-reload) /etc/init.d/xfs reload ;; stop) echo -n "Stopping X font server: xfs" if ! [ -f $PIDFILE ]; then echo " not running ($PIDFILE not found)" # The daemon is not running; do not tell the maintainer scripts that it # has not stopped. rm -f $UPGRADEFILE else DAEMONPID=$(cat $PIDFILE | tr -d '[:blank:]') KILLCOUNT=1 if ! [ -e $UPGRADEFILE ]; then if start-stop-daemon --stop --quiet $SSD_STOP_ARGS; then # give xfs's signal handler a second to catch its breath sleep 1 else echo -n " not running" fi fi while [ $KILLCOUNT -le 5 ]; do if stillrunning; then kill $DAEMONPID else break fi sleep 1 KILLCOUNT=$(( $KILLCOUNT + 1 )) done if stillrunning; then echo -n " not responding to TERM signal (pid $DAEMONPID)" else # The daemon is not running; do not tell the maintainer scripts that it # has not stopped. rm -f $UPGRADEFILE fi fi echo "." ;; *) echo "Usage: /etc/init.d/xfs {start|stop|restart|reload|force-reload}" exit 1 ;; esac exit 0 # vim:set ai et sts=2 sw=2 tw=80: metainit/etc/rc2.d/S20fanctrld0000755000175000017500000000177410633744272015070 0ustar jojojojo#!/bin/sh # # ddclient This shell script takes care of starting and stopping fanctrld. # # chkconfig: 345 65 35 # description: fanctrld controls the fan on an IBM thinkpad # processname: ddclient # config: /etc/sysconfig/fanctrld # Source networking configuration. . /etc/default/fanctrld exec=/usr/local/sbin/fanctrld prog=$(basename $exec) pidfile=/var/run/$prog.pid start() { /sbin/modprobe ibm_acpi echo -n $"Starting $prog: " #daemon $exec $FANCTRLD_OPTIONS start-stop-daemon --start --exec $exec -- $FANCTRLD_OPTIONS echo . } stop() { echo -n $"Stopping $prog: " start-stop-daemon --stop --exec $exec -- $FANCTRLD_OPTIONS echo . } restart() { stop start } reload() { restart } force_reload() { restart } # See how we were called. case "$1" in start|stop|restart|reload) $1 ;; force-reload) force_reload ;; *) echo $"Usage: $0 {start|stop|restart|reload|force-reload}" exit 2 esac metainit/etc/rc2.d/S10sysklogd0000755000175000017500000000454110633744272015124 0ustar jojojojo#! /bin/sh # /etc/init.d/sysklogd: start the system log daemon. ### BEGIN INIT INFO # Provides: syslog # Required-Start: $local_fs $time # Required-Stop: $local_fs $time # Should-Start: $network $named # Should-Stop: $network $named # Default-Start: S 1 2 3 4 5 # Default-Stop: 0 6 # Short-Description: System logger ### END INIT INFO PATH=/bin:/usr/bin:/sbin:/usr/sbin pidfile=/var/run/syslogd.pid binpath=/sbin/syslogd test -x $binpath || exit 0 test ! -r /etc/default/syslogd || . /etc/default/syslogd . /lib/lsb/init-functions create_xconsole() { # Only proceed if /dev/xconsole is used at all if ! grep -q '^[^#].*/dev/xconsole' /etc/syslog.conf then return fi if [ ! -e /dev/xconsole ]; then mknod -m 640 /dev/xconsole p else chmod 0640 /dev/xconsole fi chown root:adm /dev/xconsole } running() { # No pidfile, probably no daemon present # if [ ! -f $pidfile ] then return 1 fi pid=`cat $pidfile` # No pid, probably no daemon present # if [ -z "$pid" ] then return 1 fi if [ ! -d /proc/$pid ] then return 1 fi cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1` # No syslogd? # if [ "$cmd" != "$binpath" ] then return 1 fi return 0 } case "$1" in start) log_begin_msg "Starting system log daemon..." create_xconsole start-stop-daemon --start --quiet --pidfile $pidfile --name syslogd --startas $binpath -- $SYSLOGD log_end_msg $? ;; stop) log_begin_msg "Stopping system log daemon..." start-stop-daemon --stop --quiet --pidfile $pidfile --name syslogd log_end_msg $? ;; reload|force-reload) log_begin_msg "Reloading system log daemon..." start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile --name syslogd log_end_msg $? ;; restart) log_begin_msg "Restarting system log daemon..." start-stop-daemon --stop --retry 5 --quiet --pidfile $pidfile --name syslogd start-stop-daemon --start --quiet --pidfile $pidfile --name syslogd --startas $binpath -- $SYSLOGD log_end_msg $? ;; reload-or-restart) if running then $0 reload else $0 start fi ;; *) log_success_msg "Usage: /etc/init.d/sysklogd {start|stop|reload|restart|force-reload|reload-or-restart}" exit 1 esac exit 0 metainit/etc/rc2.d/S20libchipcard2-tools0000755000175000017500000000357710633744272016762 0ustar jojojojo#! /bin/sh ### BEGIN INIT INFO # Provides: chipcardd2 # Required-Start: $syslog $remote_fs $local_fs # Required-Stop: $syslog $remote_fs $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: daemon for smartcard access # Description: server that libchipcard2-based program can # connect to ### END INIT INFO # # NOTE: The above assumes unix sockets are used (otherwise $network and # $named might be wanted) # # Start and stop chipcardd, adapted by packager from skeleton by: # # Written by Miquel van Smoorenburg . # Modified for Debian GNU/Linux # by Ian Murdock . # PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/chipcardd2 PIDFILE=/var/run/chipcard2/chipcardd2.pid DAEMON_ARGS="--pidfile $PIDFILE --exit-on-error" NAME=chipcardd2 DESC="libchipcard2 daemon" test -x $DAEMON || exit 0 set -e check_var_run() { if [ ! -d /var/run/chipcard2 ] ; then mkdir -p /var/run/chipcard2 chown chipcard /var/run/chipcard2 fi } case "$1" in start) echo -n "Starting $DESC: " check_var_run start-stop-daemon --start --quiet --pidfile $PIDFILE \ --exec $DAEMON -- $DAEMON_ARGS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \ --exec $DAEMON echo "$NAME." ;; reload) echo "Reloading $DESC configuration files." start-stop-daemon --stop --signal 1 --quiet --pidfile \ $PIDFILE --exec $DAEMON ;; restart|force-reload) echo -n "Restarting $DESC: " start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \ --exec $DAEMON sleep 1 check_var_run start-stop-daemon --start --quiet --pidfile $PIDFILE \ --user chipcard --chuid chipcard --exec $DAEMON -- $DAEMON_ARGS echo "$NAME." ;; *) N=$0 echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/S20makedev0000755000175000017500000000203610633744272014677 0ustar jojojojo#! /bin/sh ### BEGIN INIT INFO # Provides: makedev # Required-Start: $local_fs # Required-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Creates device files in /dev ### END INIT INFO N=/etc/init.d/makedev PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin set -e case "$1" in start) test -L /dev/MAKEDEV || ln -fs /sbin/MAKEDEV /dev/MAKEDEV # create dvb-devices, if the dvb-directory allready exists, and # no devfs or udev is in use (workaround for the changed major-number # of the dvb-devices, introduced in kernel 2.6.8, to be able to # switch between kernels <= 2.6.7 and >= 2.6.8, without manual # recreation of the devices (MAKEDEV dvb checks the kernel-version # and uses the correct major-number)) if [ ! -e /dev/.devfsd -a ! -e /dev/.udevdb -a ! -e /dev/.udev ]; then if [ -d /dev/dvb ]; then cd /dev && ./MAKEDEV dvb fi fi ;; stop|reload|restart|force-reload) ;; *) echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/S20mplayer0000755000175000017500000000732510633744272014742 0ustar jojojojo#!/bin/sh ### BEGIN INIT INFO # Provides: mplayer-RTC-settings # Required-Start: $local_fs $syslog # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: sets access to RTC device (for MPlayer) # Description: loads RTC module, creates and sets permission of /dev/rtc ### END INIT INFO # Extract from /usr/share/doc/mplayer/...../documentation.html : #The new timer code uses PC's RTC (Real Time Clock) for this task, #because it has precise 1ms timers. It is automatically enabled when #available, but requires root privileges, a setuid root MPlayer binary #or a properly set up kernel. #(this is solved in Debian by proper settings on /dev/rtc). # If you are running kernel 2.4.19pre8 or #later you can adjust the maximum RTC frequency for normal users #through the /proc filesystem. Use this command to enable RTC for #normal users: echo 1024 > /proc/sys/dev/rtc/max-user-freq # The power management functions of some notebook BIOSes with # speedstep CPUs interact badly with RTC. Audio and video may get out # of sync. Plugging the external power connector in before you power # up your notebook seems to help. You can always turn off RTC support # with the -nortc option. In some hardware combinations (confirmed # during usage of non-DMA DVD drive on an ALi1541 board) usage of the # RTC timer causes skippy playback. # To enable/disable, reconfigure mplayer with `dpkg-reconfigure mplayer' #################### #so that lintian wont complain [ "$1" = stop ] && exit 0 [ "$1" = start -o "$1" = restart -o "$1" = force-reload -o "$1" = reload ] || exit 0 ###################### # If /lib/lsb/init-functions doesn't exist # define them here, otherwise installer breaks if [ -f /lib/lsb/init-functions ]; then . /lib/lsb/init-functions else log_begin_msg () { echo -n "$@" ; } log_progress_msg () { echo -n "$@" ; } log_warning_msg () { echo "$@" ; } log_failure_msg () { echo "$@" ; } log_end_msg () { if [ "$1" = 0 ]; then echo " ...done." else echo " ...fail!" fi } fi ###################### if [ -r /etc/mplayer/mplayer.conf ] ; then if ! grep -q "^ *rtc=1" /etc/mplayer/mplayer.conf ; then #log_warning_msg Mplayer does not require RTC support. exit 0 fi fi ## this is somewhat slow... ##debconf-show mplayer | grep -q 'mplayer/rtc.*true' || exit 0 ########### log_begin_msg Setting RTS support for MPlayer comma=':' if [ ! -e /dev/rtc ] ; then r=$( uname -r) c=/boot/config-$r if [ ! -e $c ] || grep -qx 'CONFIG_RTC=m' $c ; then if modprobe rtc > /dev/null ; then log_progress_msg $comma 'loaded module rtc' ; comma=, else log_failure_msg $comma 'error loading module rtc' ; comma=, fi if test -r /sbin/udevsettle ; then log_progress_msg $comma ' and waiting for udev ' ; comma=, /sbin/udevsettle --timeout=3 fi fi if [ ! -e /dev/rtc ] ; then log_progress_msg $comma 'creating /dev/rtc' ; comma=, mknod /dev/rtc c 10 135 ; chown root.audio /dev/rtc ; chmod 660 /dev/rtc fi fi if ! ls -lL /dev/rtc | grep -qx 'crw-rw----.*root.*audio.*/dev/rtc' then log_progress_msg $comma 'correcting permission/ownerskip of /dev/rtc' ; comma=, #avoid using --dereference if unneeded (to be on safe side) d='' ; [ -L /dev/rtc ] && d='--dereference' chown $d root.audio /dev/rtc ; chmod 660 /dev/rtc fi S=/proc/sys/dev/rtc/max-user-freq if [ ! -r $S ] ; then log_failure_msg 'cannot find /proc interface for max-user-freq' log_end_msg 1 exit 0 fi f=$(cat $S ) if test "$f" = "" || test "$f" -lt 1024 ; then echo 1024 > $S log_progress_msg $comma 'raising max-user-freq of RTC from '$f' to 1024' comma=, fi log_end_msg 0 exit 0 metainit/etc/rc2.d/S99rc.local0000755000175000017500000000143610633744272015003 0ustar jojojojo#! /bin/sh ### BEGIN INIT INFO # Provides: rc.local # Required-Start: $local_fs $remote_fs # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Run /etc/rc.local if it exist ### END INIT INFO PATH=/sbin:/usr/sbin:/bin:/usr/bin . /lib/init/vars.sh . /lib/lsb/init-functions do_start() { if [ -x /etc/rc.local ]; then [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)" /etc/rc.local ES=$? [ "$VERBOSE" != no ] && log_end_msg $ES return $ES fi } case "$1" in start) do_start ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) ;; *) echo "Usage: $0 start|stop" >&2 exit 3 ;; esac metainit/etc/rc2.d/S19gdm0000755000175000017500000000376610633744272014055 0ustar jojojojo#! /bin/sh ### BEGIN INIT INFO # Provides: x-display-manager gdm # Should-Start: console-screen acpid # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: GNOME Display Manager # Description: Debian init script for the GNOME Display Manager ### END INIT INFO # # Author: Ryan Murray # set -e PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/gdm DEBCONF_DAEMON=/usr/bin/gdm test -x $DAEMON || exit 0 if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE fi . /lib/lsb/init-functions # To start gdm even if it is not the default display manager, change # HEED_DEFAULT_DISPLAY_MANAGER to "false." HEED_DEFAULT_DISPLAY_MANAGER=true DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager case "$1" in start) if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" -a "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" -a "$(cat $DEFAULT_DISPLAY_MANAGER_FILE 2> /dev/null)" != "$DEBCONF_DAEMON" ]; then log_action_msg "Not starting GNOME Display Manager; it is not the default display manager" else log_daemon_msg "Starting GNOME Display Manager" "gdm" start_daemon $DAEMON log_end_msg $? fi ;; stop) log_daemon_msg "Stopping GNOME Display Manager" "gdm" set +e start-stop-daemon --stop --quiet --pidfile /var/run/gdm.pid \ --name gdm --retry 5 set -e log_end_msg $? ;; reload) log_daemon_msg "Scheduling reload of GNOME Display Manager configuration" "gdm" set +e start-stop-daemon --stop --signal USR1 --quiet --pidfile \ /var/run/gdm.pid --name gdm set -e log_end_msg $? ;; restart|force-reload) $0 stop $0 start ;; *) echo "Usage: /etc/init.d/gdm {start|stop|restart|reload|force-reload}" exit 1 ;; esac exit 0 metainit/etc/rc2.d/S20sysfsutils0000755000175000017500000000367510633744272015525 0ustar jojojojo#! /bin/sh -e ### BEGIN INIT INFO # Provides: sysfsconf # Required-Start: mountkernfs # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: Set sysfs variables from /etc/sysfs.conf # Description: Similarly to /etc/init.d/procps.sh, you can configure # values for sysfs variables (such as power management # defaults) and /sys file permissions in /etc/sysfs.conf. ### END INIT INFO # /etc/init.d/sysfsutils: # # (c) 2005 Martin Pitt CONFFILE=/etc/sysfs.conf [ -r "$CONFFILE" ] || exit 0 case "$1" in start|restart|force-reload) echo -n "Setting sysfs variables..." sed 's/#.*$//; /^[[:space:]]*$/d; s/^[[:space:]]*\([^=[:space:]]*\)[[:space:]]*\([^=[:space:]]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1 \2 \3/' \ $CONFFILE | { while read f1 f2 f3; do if [ "$f1" = "mode" -a -n "$f2" -a -n "$f3" ]; then if [ -f "/sys/$f2" ]; then chmod "$f3" "/sys/$f2" else echo "unknown attribute $f2" fi elif [ "$f1" = "owner" -a -n "$f2" -a -n "$f3" ]; then if [ -f "/sys/$f2" ]; then chown "$f3" "/sys/$f2" else echo "unknown attribute $f2" fi elif [ "$f1" -a -n "$f2" -a -z "$f3" ]; then if [ -f "/sys/$f1" ]; then echo -n "$f2" > "/sys/$f1" else echo "unknown attribute $f1" fi else echo "syntax error in $CONFFILE: '$f1' '$f2' '$f3'" exit 1 fi done } echo "done." ;; stop) ;; *) echo "Usage: /etc/init.d/sysfsutils {start|stop|force-reload|restart}" exit 1 ;; esac metainit/etc/rc2.d/K20yaws0000755000175000017500000000363310633744272014242 0ustar jojojojo#! /bin/sh # # Start/stop Yaws web server # # Written by Miquel van Smoorenburg . # Modified for Debian by Ian Murdock . # Modified for yaws #by Will Newton # and Sergei Golovan ### BEGIN INIT INFO # Provides: yaws # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Starts Yaws web server # Description: Starts Yaws web server, a high perfomance # HTTP 1.1 webserver written in Erlang. ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/yaws NAME="yaws web server" DESC=yaws YAWS_USER=yaws YAWS_ID=debian_yaws test -x $DAEMON || exit 0 # Include yaws defaults if available if [ -f /etc/default/yaws ] ; then . /etc/default/yaws fi set -e daemon() { script="$DAEMON -I $YAWS_ID $@" su $YAWS_USER -c "$script" } case "$1" in start) echo -n "Starting $DESC: " daemon -D $DAEMON_OPTS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " daemon -s echo "$NAME." ;; status) daemon -S ;; reload|force-reload) # # If the daemon can reload its config files on the fly # for example by sending it SIGHUP, do it here. # # If the daemon responds to changes in its config file # directly anyway, make this a do-nothing entry. # echo "Reloading $DESC configuration files." daemon -h ;; restart) # # If the "reload" option is implemented, move the "force-reload" # option to the "reload" entry above. If not, "force-reload" is # just the same as "restart". # echo -n "Restarting $DESC: " daemon -s sleep 1 daemon -D $DAEMON_OPTS echo "$NAME." ;; *) N=/etc/init.d/$NAME # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $N {start|stop|status|restart|force-reload}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/S20cupsys0000755000175000017500000000470110633744272014612 0ustar jojojojo#! /bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/cupsd NAME=cupsd PIDFILE=/var/run/cups/$NAME.pid DESC="Common Unix Printing System" unset TMPDIR test -f $DAEMON || exit 0 set -e if [ -r /etc/default/cupsys ]; then . /etc/default/cupsys fi . /lib/lsb/init-functions # Get the timezone set. if [ -z "$TZ" -a -e /etc/timezone ]; then TZ=`cat /etc/timezone` export TZ fi case "$1" in start) log_begin_msg "Starting $DESC: $NAME" chown root:lpadmin /usr/share/ppd/custom 2>/dev/null || true chmod 3775 /usr/share/ppd/custom 2>/dev/null || true mkdir -p `dirname "$PIDFILE"` if [ "$LOAD_LP_MODULE" = "yes" -a -f /usr/lib/cups/backend/parallel \ -a -f /proc/devices -a -f /proc/modules -a -x /sbin/modprobe \ -a -z "$(grep -e ' lp$' /proc/devices 2>/dev/null)" ]; then modprobe -q lp || true modprobe -q ppdev || true fi chown cupsys:lp `dirname "$PIDFILE"` # create the logs file since cupsd can't for l in access_log page_log error_log; do [ -e /var/log/cups/$l ] || touch /var/log/cups/$l chmod 640 /var/log/cups/$l chown cupsys:lpadmin /var/log/cups/$l done start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec $DAEMON # Correct the permissions after starting the CUPS daemon for l in access_log page_log error_log; do chmod 640 /var/log/cups/$l || true chown cupsys:lpadmin /var/log/cups/$l || true done log_end_msg $? ;; stop) log_begin_msg "Stopping $DESC: $NAME" start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME log_end_msg $? ;; restart|force-reload) log_begin_msg "Restarting $DESC: $NAME" if start-stop-daemon --stop --quiet --retry 5 --oknodo --pidfile $PIDFILE --name $NAME; then start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec $DAEMON # Correct the permissions after starting the CUPS daemon for l in access_log page_log error_log; do chmod 640 /var/log/cups/$l || true chown cupsys:lpadmin /var/log/cups/$l || true done fi log_end_msg $? ;; status) echo -n "Status of $DESC: " if [ ! -r "$PIDFILE" ]; then echo "$NAME is not running." exit 3 fi if read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then echo "$NAME is running." exit 0 else echo "$NAME is not running but $PIDFILE exists." exit 1 fi ;; *) N=/etc/init.d/${0##*/} echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/S99uptimed0000755000175000017500000000173510633744272014757 0ustar jojojojo#! /bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/uptimed NAME=uptimed DESC="uptime daemon" test -f $DAEMON || exit 0 case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --user daemon --chuid daemon --exec $DAEMON echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --user daemon --exec $DAEMON echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " start-stop-daemon --stop --quiet --user daemon --exec $DAEMON sleep 1 start-stop-daemon --start --quiet --user daemon --chuid daemon --exec $DAEMON echo "$NAME." ;; restart-if-running) set +e echo -n "Restarting $DESC (if running): " if start-stop-daemon --stop --quiet --user daemon --exec $DAEMON; then sleep 1 start-stop-daemon --start --quiet --user daemon --chuid daemon --exec $DAEMON fi echo "$NAME." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/K20ssh0000755000175000017500000000356510633744272014060 0ustar jojojojo#! /bin/sh set -e # /etc/init.d/ssh: start and stop the OpenBSD "secure shell(tm)" daemon test -x /usr/sbin/sshd || exit 0 ( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0 if test -f /etc/default/ssh; then . /etc/default/ssh fi check_for_no_start() { # forget it if we're trying to start, and /etc/ssh/sshd_not_to_be_run exists if [ -e /etc/ssh/sshd_not_to_be_run ]; then echo "OpenBSD Secure Shell server not in use (/etc/ssh/sshd_not_to_be_run)" exit 0 fi } check_privsep_dir() { # Create the PrivSep empty dir if necessary if [ ! -d /var/run/sshd ]; then mkdir /var/run/sshd chmod 0755 /var/run/sshd fi } check_config() { if [ ! -e /etc/ssh/sshd_not_to_be_run ]; then /usr/sbin/sshd -t || exit 1 fi } export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" case "$1" in start) check_for_no_start check_privsep_dir echo -n "Starting OpenBSD Secure Shell server: sshd" start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS echo "." ;; stop) echo -n "Stopping OpenBSD Secure Shell server: sshd" start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/sshd.pid echo "." ;; reload|force-reload) check_for_no_start check_config echo -n "Reloading OpenBSD Secure Shell server's configuration" start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd echo "." ;; restart) check_privsep_dir check_config echo -n "Restarting OpenBSD Secure Shell server: sshd" start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile /var/run/sshd.pid check_for_no_start start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS echo "." ;; *) echo "Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart}" exit 1 esac exit 0 metainit/etc/rc2.d/S20smartmontools0000755000175000017500000000436610633744272016214 0ustar jojojojo#!/bin/sh -e # # smartmontools init.d startup script # # (C) 2003,04 Guido Gnther # # loosely based on the init script that comes with smartmontools which is # copyrighted 2002 by Bruce Allen SMARTCTL=/usr/sbin/smartctl SMARTD=/usr/sbin/smartd SMARTDPID=/var/run/smartd.pid [ -x $SMARTCTL ] || exit 0 [ -x $SMARTD ] || exit 0 . /lib/lsb/init-functions RET=0 [ -r /etc/default/smartmontools ] && . /etc/default/smartmontools smartd_opts="--pidfile $SMARTDPID $smartd_opts" enable_smart() { log_action_begin_msg "Enabling S.M.A.R.T." for device in $enable_smart; do log_action_cont_msg "$device" if ! $SMARTCTL --quietmode=errorsonly --smart=on $device; then log_action_cont_msg "(failed)" RET=2 fi done log_action_end_msg 0 } check_start_smartd_option() { if [ ! "$start_smartd" = "yes" ]; then log_warning_msg "Not starting S.M.A.R.T. daemon smartd, disabled via /etc/default/smartmontools" return 1 else return 0 fi } case "$1" in start) [ -n "$enable_smart" ] && enable_smart if check_start_smartd_option; then rm -f $SMARTDPID log_daemon_msg "Starting S.M.A.R.T. daemon" "smartd" if start-stop-daemon --start --quiet --pidfile $SMARTDPID \ --exec $SMARTD -- $smartd_opts; then log_end_msg 0 else log_end_msg 1 RET=1 fi fi ;; stop) log_daemon_msg "Stopping S.M.A.R.T. daemon" "smartd" start-stop-daemon --stop --quiet --oknodo --pidfile $SMARTDPID log_end_msg 0 ;; reload|force-reload) log_daemon_msg "Reloading S.M.A.R.T. daemon" "smartd" if start-stop-daemon --stop --quiet --signal 1 \ --pidfile $SMARTDPID; then log_end_msg 0 else log_end_msg 1 RET=1 fi ;; restart) if check_start_smartd_option; then log_daemon_msg "Restarting S.M.A.R.T. daemon" "smartd" start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $SMARTDPID rm -f $SMARTDPID if start-stop-daemon --start --quiet --pidfile $SMARTDPID \ --exec $SMARTD -- $smartd_opts; then log_end_msg 0 else log_end_msg 1 RET=1 fi fi ;; *) echo "Usage: /etc/init.d/smartmontools {start|stop|restart|reload|force-reload}" exit 1 esac exit $RET metainit/etc/rc2.d/S89atd0000755000175000017500000000171110633744272014051 0ustar jojojojo#! /bin/sh -e #### BEGIN INIT INFO # Provides: atd # Required-Start: $syslog $time $local_fs $remote_fs # Required-Stop: $syslog $time $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: Deferred execution scheduler # Description: Debian init script for the atd deferred executions # scheduler ### END INIT INFO # # Author: Ryan Murray # set -e PATH=/bin:/usr/bin:/sbin:/usr/sbin DAEMON=/usr/sbin/atd test -x $DAEMON || exit 0 . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting deferred execution scheduler" "atd" start_daemon $DAEMON log_end_msg $? ;; stop) log_daemon_msg "Stopping deferred execution scheduler" "atd" killproc $DAEMON log_end_msg $? ;; force-reload|restart) $0 stop $0 start ;; *) echo "Usage: /etc/init.d/atd {start|stop|restart|force-reload}" exit 1 ;; esac exit 0 metainit/etc/rc2.d/S33irda-utils0000755000175000017500000000503610633744272015347 0ustar jojojojo#!/bin/sh ### BEGIN INIT INFO # Provides: irda # Required-Start: $network $local_fs # Required-Stop: $network $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Infrared port support ### END INIT INFO # irda-utils Init script for irda-utils: manage start and stop of # irattach and setup some other items. # # Authors: Sebastian Henschel # Alberto Gonzalez Iniesta set -e PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" DAEMON="/usr/sbin/irattach" NAME="irattach" PIDFILE="/var/run/$NAME.pid" PACKAGE="irda-utils" DESC="IrDA service" SYSCTL="/sbin/sysctl" SMCINIT="/usr/sbin/smcinit" test -x $DAEMON || exit 0 test -x $SYSCTL || exit 0 # Handle configuration if [ -f /etc/default/$PACKAGE ]; then . /etc/default/$PACKAGE fi test "$ENABLE" = "false" && exit 0 if [ -z "$DEVICE" ]; then DEVICE="/dev/ttyS1" fi if [ -z "$DONGLE" ]; then DONGLE="" else if [ "$DONGLE" != "none" ]; then DONGLE="-d $DONGLE" fi fi if [ "$DISCOVERY" = "true" ]; then DISCOVERY="-s" else DISCOVERY="" fi case "$1" in start) echo -n "Starting $DESC: $NAME" # Running smcinit is needed in some laptops prior to port use # You should set this variable in /etc/default/irda-utils if [ "$USE_SMCINIT" = "yes" ]; then $SMCINIT fi # Needed for some machines in FIR-mode if [ -n "$SETSERIAL" ]; then test -x /bin/setserial || exit 0 /bin/setserial $SETSERIAL uart none port 0x0 irq 0 fi # Needed for pmac_zilog case $(uname -r) in 2.6.*) case "$DEVICE" in /dev/ttyS*) modprobe irtty-sir 2> /dev/null || true ;; esac ;; esac start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \ -- $DEVICE $DONGLE $DISCOVERY sleep 1 if [ -n "$DISCOVERY" ]; then $SYSCTL -e -q -w net.irda.discovery=1 else $SYSCTL -e -q -w net.irda.discovery=0 fi $SYSCTL -e -q -w net.irda.max_baud_rate=115200 echo "." ;; stop) echo -n "Stopping $DESC: $NAME" if [ -n "$DISCOVERY" ]; then $SYSCTL -e -q -w net.irda.discovery=0 fi start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON echo "." ;; #reload) # ;; restart|force-reload) $0 stop sleep 1 $0 start ;; *) N=/etc/init.d/$PACKAGE echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/S90binfmt-support0000755000175000017500000000212510633744272016262 0ustar jojojojo#! /bin/sh ### BEGIN INIT INFO # Provides: binfmt-support # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Support for extra binary formats # Description: Enable support for extra binary formats using the Linux # kernel's binfmt_misc facility. ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin NAME=binfmt-support DESC="additional executable binary formats" test -x /usr/sbin/update-binfmts || exit 0 . /lib/lsb/init-functions . /etc/default/rcS set -e CODE=0 case "$1" in start) log_daemon_msg "Enabling $DESC" "$NAME" update-binfmts --enable || CODE=$? log_end_msg $CODE exit $CODE ;; stop) log_daemon_msg "Disabling $DESC" "$NAME" update-binfmts --disable || CODE=$? log_end_msg $CODE exit $CODE ;; restart|force-reload) $0 stop $0 start ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 metainit/etc/rc2.d/S25bluetooth0000755000175000017500000001251610633744272015301 0ustar jojojojo#! /bin/bash ### BEGIN INIT INFO # Provides: bluetooth # Required-Start: $local_fs $syslog $remote_fs # Required-Stop: $local_fs $syslog $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start bluetooth daemons ### END INIT INFO # # bluez-utils Bluetooth subsystem starting and stopping # # originally from bluez's scripts/bluetooth.init # # Edd Dumbill # LSB 3.0 compilance and enhancements by Filippo Giunchedi # # startup control over dund and pand can be changed by editing # /etc/default/bluez-utils PATH=/sbin:/bin:/usr/sbin:/usr/bin DESC=bluetooth HCID=/usr/sbin/hcid HCIATTACH=/usr/sbin/hciattach HCID_NAME=hcid HID2HCI=/usr/sbin/hid2hci UART_CONF=/etc/bluetooth/uart RFCOMM=/usr/bin/rfcomm RFCOMM_NAME=rfcomm RFCOMM_CONF=/etc/bluetooth/rfcomm.conf SDPD=/usr/sbin/sdpd SDPD_NAME=sdpd SDPTOOL=/usr/bin/sdptool DUND_DAEMON=/usr/bin/dund DUND_NAME=dund PAND_DAEMON=/usr/bin/pand PAND_NAME=pand HIDD_DAEMON=/usr/bin/hidd HIDD_NAME=hidd DUND_ENABLED=0 PAND_ENABLED=0 HIDD_ENABLED=0 DUND_OPTIONS="" PAND_OPTIONS="" HIDD_OPTIONS="--master --server" test -f /etc/default/bluetooth && . /etc/default/bluetooth . /lib/lsb/init-functions # test for essential daemons test -x $HCID || exit 0 test -x $HCIATTACH || exit 0 test -x $RFCOMM || exit 0 test -x $SDPD || exit 0 # disable nonessential daemons if not present if test "$DUND_ENABLED" != "0"; then if ! test -f $DUND_DAEMON; then DUND_ENABLED=0 fi fi if test "$PAND_ENABLED" != "0"; then if ! test -f $PAND_DAEMON; then PAND_ENABLED=0 fi fi if test "$HIDD_ENABLED" != "0"; then if ! test -f $HIDD_DAEMON; then HIDD_ENABLED=0 fi fi set -e run_sdptool() { test -x $SDPTOOL || return 1 if ! test -z "$SDPTOOL_OPTIONS" ; then oldifs="$IFS" IFS=";" for o in $SDPTOOL_OPTIONS ; do #echo "execing $SDPTOOL $o" IFS=" " $SDPTOOL $o &>/dev/null done IFS="$oldifs" fi } enable_hci_input() { #echo "Switching on Bluetooth input devices." $HID2HCI -q --tohci } disable_hci_input() { #echo "Switching Bluetooth input devices back to HCI mode." $HID2HCI -q --tohid } start_pan() { if test "$DUND_ENABLED" != "0"; then start-stop-daemon --start --quiet --exec $DUND_DAEMON -- $DUND_OPTIONS log_progress_msg "dund" fi if test "$PAND_ENABLED" != "0"; then start-stop-daemon --start --quiet --exec $PAND_DAEMON -- $PAND_OPTIONS log_progress_msg "pand" fi } stop_pan() { if test "$DUND_ENABLED" != "0"; then start-stop-daemon --stop --quiet --exec $DUND_DAEMON || true log_progress_msg "dund" fi if test "$PAND_ENABLED" != "0"; then start-stop-daemon --stop --quiet --exec $PAND_DAEMON || true log_progress_msg "pand" fi } start_hid() { if test "$HIDD_ENABLED" != "0"; then start-stop-daemon --start --quiet --exec $HIDD_DAEMON -- $HIDD_OPTIONS log_progress_msg "hidd" fi } stop_hid() { if test "$HIDD_ENABLED" != "0"; then $HIDD_DAEMON --killall start-stop-daemon --stop --quiet --exec $HIDD_DAEMON || true log_progress_msg "hidd" fi } start_uarts() { [ -f $HCIATTACH ] && [ -f $UART_CONF ] || return grep -v '^#' $UART_CONF | while read i; do $HCIATTACH $i done } stop_uarts() { killall hciattach > /dev/null 2>&1 || true } start_rfcomm() { if [ -x $RFCOMM ] && [ -f $RFCOMM_CONF ] ; then # rfcomm must always succeed for now: users # may not yet have an rfcomm-enabled kernel $RFCOMM -f $RFCOMM_CONF bind all || true log_progress_msg "$RFCOMM_NAME" fi } stop_rfcomm() { if [ -x $RFCOMM ] ; then log_progress_msg "$RFCOMM_NAME" $RFCOMM unbind all || true fi } restart_rfcomm() { if [ -x $RFCOMM ] && [ -f $RFCOMM_CONF ] ; then $RFCOMM unbind all || true $RFCOMM -f $RFCOMM_CONF bind all || true log_progress_msg "$RFCOMM_NAME" fi } case "$1" in start) log_daemon_msg "Starting $DESC" if test "$BLUETOOTH_ENABLED" == "0"; then log_progress_msg "disabled. see /etc/default/bluetooth" log_end_msg 0 exit 0 fi start-stop-daemon --start --quiet --exec $HCID || true log_progress_msg "hcid" start_uarts || true start-stop-daemon --start --quiet --exec $SDPD || true log_progress_msg "sdpd" run_sdptool || true log_progress_msg "sdp_options" start_hid || true enable_hci_input || true start_rfcomm || true start_pan || true log_end_msg 0 ;; stop) log_daemon_msg "Stopping $DESC" stop_pan || true stop_rfcomm || true disable_hci_input || true stop_hid || true start-stop-daemon --stop --quiet --exec $SDPD || true log_progress_msg "$SDPD_NAME" start-stop-daemon --stop --quiet --exec $HCID || true log_progress_msg "$HCID_NAME" stop_uarts || true log_end_msg 0 ;; restart|force-reload) log_daemon_msg "Restarting $DESC" stop_hid || true stop_pan || true start-stop-daemon --stop --quiet --exec $SDPD || true start-stop-daemon --stop --quiet --exec $HCID || true sleep 1 if test "$BLUETOOTH_ENABLED" == "0"; then log_progress_msg "disabled. see /etc/default/bluetooth" log_end_msg 0 exit 0 fi start-stop-daemon --start --quiet --exec $HCID || true start-stop-daemon --start --quiet --exec $SDPD || true log_progress_msg "$HCID_NAME" log_progress_msg "$SDPD_NAME" start_pan || true start_hid || true restart_rfcomm log_end_msg 0 ;; *) N=/etc/init.d/bluetooth # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 # vim:noet metainit/etc/rc2.d/S20exim40000755000175000017500000001570010633744272014313 0ustar jojojojo#! /bin/sh # /etc/init.d/exim4 # # Written by Miquel van Smoorenburg . # Modified for Debian GNU/Linux by Ian Murdock . # Modified for exim by Tim Cutts # Modified for exim4 by Andreas Metzler # and Marc Haber ### BEGIN INIT INFO # Provides: exim4 mail-transport-agent # Required-Start: $local_fs $remote_fs $syslog $named $network $time # Required-Stop: $local_fs $remote_fs $syslog $named $network # Should-Start: postgresql mysql clamav-daemon greylist spamassassin # Should-Stop: postgresql mysql clamav-daemon greylist spamassassin # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: exim Mail Transport Agent # Description: exim is a Mail Transport agent ### END INIT INFO set -e if ! [ -x "/lib/lsb/init-functions" ]; then . /lib/lsb/init-functions else echo "E: /lib/lsb/init-functions not found, lsb-base (>= 3.0-6) needed" exit 1 fi if [ -n "$EX4DEBUG" ]; then echo "now debugging $0 $@" set -x fi ENV="env -i LANG=C PATH=$PATH" #read default file QUEUERUNNER='combined' QUEUEINTERVAL='30m' UPEX4OPTS='' PIDFILE="/var/run/exim4/exim.pid" QRPIDFILE="/var/run/exim4/eximqr.pid" [ -f /etc/default/exim4 ] && . /etc/default/exim4 upex4conf() { UPEX4CONF="update-exim4.conf" OLDIFS="$IFS" IFS=: for p in $PATH; do if [ -x "$p/$UPEX4CONF" ]; then IFS="$OLDIFS" $p/$UPEX4CONF $UPEX4OPTS return 0 fi done IFS="$OLDIFS" } # Exit if exim runs from /etc/inetd.conf if [ -f /etc/inetd.conf ] && grep -E -q '^[[:space:]]*((\*|[[:alnum:].-]+):)?smtp' /etc/inetd.conf then upex4conf exit 0 fi DAEMON="/usr/sbin/exim4" NAME="exim4" ##test -x $DAEMON || exit 0 test -x /usr/lib/exim4/exim4 || exit 0 # this is from madduck on IRC, 2006-07-06 # There should be a better possibility to give daemon error messages # and/or to log things log() { case "$1" in [[:digit:]]*) success=$1; shift;; *) :;; esac log_action_begin_msg "$1"; shift log_action_end_msg ${success:-0} "$*" } start_exim() { [ -e /var/run/exim4 ] || \ install -d -oDebian-exim -gDebian-exim -m750 /var/run/exim4 case ${QUEUERUNNER} in combined) $ENV start-stop-daemon --oknodo --start --pidfile "$PIDFILE" \ --exec $DAEMON -- -bd -q${QFLAGS}${QUEUEINTERVAL} \ ${COMMONOPTIONS} ${QUEUERUNNEROPTIONS} ${SMTPLISTENEROPTIONS} log_progress_msg "exim4" ;; separate) $ENV start-stop-daemon --oknodo --start --pidfile "$PIDFILE" \ --exec $DAEMON -- -bd ${SMTPLISTENEROPTIONS} ${COMMONOPTIONS} log_progress_msg "exim4_listener" $ENV start-stop-daemon --oknodo --start --pidfile "$QRPIDFILE" \ --exec $DAEMON -- -oP "$QRPIDFILE" \ -q${QFLAGS}${QUEUEINTERVAL} ${QUEUERUNNEROPTIONS} ${COMMONOPTIONS} log_progress_msg "exim4_queuerunner" ;; queueonly) $ENV start-stop-daemon --oknodo --start --pidfile "$QRPIDFILE" \ --exec $DAEMON -- -oP "$QRPIDFILE" \ -q${QFLAGS}${QUEUEINTERVAL} ${QUEUERUNNEROPTIONS} ${COMMONOPTIONS} log_progress_msg "exim4_queuerunner" ;; no|ppp) $ENV start-stop-daemon --oknodo --start --pidfile "$PIDFILE" \ --exec $DAEMON -- -bd ${SMTPLISTENEROPTIONS} log_progress_msg "exim4_listener" ;; nodaemon) ;; esac } stop_exim() { # we try to kill eximqr and exim SMTP listener, no matter what # ${QUEUERUNNER} is set to, we could have switched since starting. if [ -f "$QRPIDFILE" ]; then start-stop-daemon --stop --oknodo --pidfile "$QRPIDFILE" \ --oknodo --retry 30 --exec $DAEMON log_progress_msg "exim4_queuerunner" fi if [ -f "$PIDFILE" ]; then start-stop-daemon --stop --oknodo --pidfile "$PIDFILE" \ --oknodo --retry 30 --exec $DAEMON log_progress_msg "exim4_listener" fi rm -f "$QRPIDFILE" "$PIDFILE" } reload_exim() { case ${QUEUERUNNER} in combined|no|ppp) start-stop-daemon --stop --pidfile "$PIDFILE" \ --signal 1 --exec $DAEMON log_progress_msg "exim4" ;; separate) start-stop-daemon --stop --pidfile "$PIDFILE" \ --signal 1 --exec $DAEMON log_progress_msg "exim4_listener" start-stop-daemon --stop --pidfile "$QRPIDFILE" \ --signal 1 --exec $DAEMON log_progress_msg "exim4_queuerunner" ;; esac } kill_all_exims() { SIG="${1:-TERM}" for pid in $(pidof $NAME); do if [ "$(readlink /proc/$pid/root)" = "/" ]; then kill -$SIG $pid fi done } status() { # the exit value of this function reflects the status of the SMTP # service. Output shows the status of the queue runner as well. SMTPNAME="SMTP listener daemon" QRNAME="separate queue runner daemon" if [ "${QUEUERUNNER}" = "combined" ]; then SMTPNAME="combined SMTP listener and queue runner daemon" fi log_action_begin_msg "checking $QRNAME" if start-stop-daemon --stop --signal 0 --quiet --pid $QRPIDFILE >/dev/null; then log_action_end_msg 0 "running" else if [ -e "$QRPIDFILE" ]; then log_action_end_msg 1 "$QRNAME failed" else log_action_end_msg 0 "not running" fi fi log_action_begin_msg "checking $SMTPNAME" if start-stop-daemon --stop --signal 0 --quiet --pid $PIDFILE >/dev/null; then log_action_end_msg 0 "running" exit 0 else if [ -e "$PIDFILE" ]; then log_action_end_msg 1 "$SMTPNAME failed" exit 1 else log_action_end_msg 0 "not running" exit 3 fi fi } # check for valid configuration file isconfigvalid() { if ! $DAEMON -bV > /dev/null ; then log 1 "Warning! Invalid configuration file for $NAME. Exiting." exit 1 fi } # check for non-empty paniclog warn_paniclog() { if [ -s "/var/log/exim4/paniclog" ]; then if [ -z "$E4BCD_PANICLOG_NOISE" ] || grep -vq "$E4BCD_PANICLOG_NOISE" /var/log/exim4/paniclog; then log_failure_msg "ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken" fi fi } case "$1" in start) log_daemon_msg "Starting MTA" # regenerate exim4.conf upex4conf isconfigvalid start_exim log_end_msg 0 warn_paniclog ;; stop) log_daemon_msg "Stopping MTA" stop_exim log_end_msg 0 warn_paniclog ;; restart) log_daemon_msg "Stopping MTA for restart" # regenerate exim4.conf upex4conf isconfigvalid stop_exim log_end_msg 0 sleep 2 log_daemon_msg "Restarting MTA" start_exim log_end_msg 0 warn_paniclog ;; reload|force-reload) log_daemon_msg "Reloading $NAME configuration files" # regenerate exim4.conf upex4conf isconfigvalid reload_exim log_end_msg 0 warn_paniclog ;; status) status ;; what) exiwhat ;; force-stop) kill_all_exims $2 ;; *) echo "Usage: $0 {start|stop|restart|reload|status|what|force-stop}" exit 1 ;; esac exit 0 # vim:tabstop=2:expandtab:shiftwidth=2 metainit/etc/rc1.d/0000755000175000017500000000000010635772246013052 5ustar jojojojometainit/etc/rc1.d/K20infon-server0000777000175000017500000000000010737205251021612 2../init.d/infon-serverustar jojojojometainit/etc/rc7.d/0000755000175000017500000000000010634212066013044 5ustar jojojojometainit/etc/init.d/0000755000175000017500000000000010636544432013323 5ustar jojojojometainit/etc/init.d/cron0000755000000000000000000001014410635564250014223 0ustar rootroot#! /bin/sh # # This a generated file. DO NOT EDIT THIS FILE! # If you want to modify how this file works, please # modify /home/jojo/debian/official/metainit/metainit/etc/metainit/cron.metainit and re-run update-metainit. # # If you are sure that you want to modify this file, # remove this comment, and update-metainit will not override # this script any more. # ### BEGIN INIT INFO # Provides: cron # Default-Start: 2 3 4 5 # Default-Stop: 1 # Short-Description: periodic command scheduler # Required-Start: $syslog $time # Required-Stop: $syslog $time # Description: cron is a standard UNIX program that runs user-specified # programs at periodic scheduled times. vixie cron adds a # number of features to the basic UNIX cron, including better # security and more powerful configuration options. ### END INIT INFO # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC=periodic\ command\ scheduler NAME=cron DAEMON=/usr/sbin/cron BASENAME=cron DAEMON_ARGS=\-f PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # # Function that starts the daemon/service # do_start() { echo "This is the Prestart-Hook"; echo "It outputs two lines."; # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started start-stop-daemon --start --background --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon --start --background --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_ARGS \ || return 2 # Add code here, if necessary, that waits for the process to be ready # to handle requests from services started subsequently which depend # on this one. As a last resort, sleep for some time. } # # Function that stops the daemon/service # do_stop() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $BASENAME RETVAL="$?" rm -f $PIDFILE return $RETVAL echo "This is the Poststop-Hook"; echo "All it does, is print this."; return "$RETVAL" } # # Function that sends a SIGHUP to the daemon/service # do_reload() { # # If the daemon can reload its configuration without # restarting (for example, when it is sent a SIGHUP), # then implement that here. # start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME return 0 } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" do_start case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; #reload|force-reload) # # If do_reload() is not implemented then leave this commented out # and leave 'force-reload' as an alias for 'restart'. # #log_daemon_msg "Reloading $DESC" "$NAME" #do_reload #log_end_msg $? #;; restart|force-reload) # # If the "reload" option is implemented then remove the # 'force-reload' alias # log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 3 ;; esac metainit/etc/init.d/infon-server0000755000175000017500000000516010636547616015677 0ustar jojojojo#! /bin/sh # # This a generated file. DO NOT EDIT THIS FILE! # If you want to modify how this file works, please # modify /home/jojo/debian/official/metainit/metainit/etc/metainit/infon-server.metainit and re-run update-metainit. # # If you are sure that you want to modify this file, # remove this comment, and update-metainit will not override # this script any more. # ### BEGIN INIT INFO # Provides: infon-server # Default-Start: # Default-Stop: 1 2 3 4 5 # Short-Description: infon-server # Required-Start: $local_fs $network $remote_fs # Required-Stop: $local_fs $network $remote_fs # Description: infon-server ### END INIT INFO # PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC=infon\-server NAME=infon\-server DAEMON=/usr/bin/infond BASENAME=infond DAEMON_ARGS= PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x "$DAEMON" ] || exit 5 # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # # Function that starts the daemon/service # do_start() { start-stop-daemon --start --oknodo --background --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_ARGS || return 1 } # # Function that stops the daemon/service # do_stop() { start-stop-daemon --stop --oknodo --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $BASENAME RETVAL="$?" rm -f $PIDFILE return $RETVAL return "$RETVAL" } # # Function that sends a SIGHUP to the daemon/service # do_reload() { start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME return 0 } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" do_start log_end_msg $? ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop log_end_msg $? ;; #reload|force-reload) # # If do_reload() is not implemented then leave this commented out # and leave 'force-reload' as an alias for 'restart'. # #log_daemon_msg "Reloading $DESC" "$NAME" #do_reload #log_end_msg $? #;; restart|force-reload) # # If the "reload" option is implemented then remove the # 'force-reload' alias # log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0) do_start log_end_msg "$?" ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 3 ;; esac metainit/etc/rc5.d/0000755000175000017500000000000010635772246013056 5ustar jojojojometainit/etc/rc5.d/K20infon-server0000777000175000017500000000000010737205251021616 2../init.d/infon-serverustar jojojojometainit/etc/metainit0000777000175000017500000000000010737205251015716 2../examples/ustar jojojojometainit/etc/rc3.d/0000755000175000017500000000000010635772246013054 5ustar jojojojometainit/etc/rc3.d/K20infon-server0000777000175000017500000000000010737205251021614 2../init.d/infon-serverustar jojojojometainit/etc/rcS.d/0000755000175000017500000000000010634212066013100 5ustar jojojojometainit/etc/rc8.d/0000755000175000017500000000000010634212066013045 5ustar jojojojometainit/etc/rc6.d/0000755000175000017500000000000010634741222013044 5ustar jojojojometainit/etc/rc0.d/0000755000175000017500000000000010634741222013036 5ustar jojojojometainit/etc/rc9.d/0000755000175000017500000000000010634212066013046 5ustar jojojojometainit/etc/rc4.d/0000755000175000017500000000000010635772246013055 5ustar jojojojometainit/etc/rc4.d/K20infon-server0000777000175000017500000000000010737205251021615 2../init.d/infon-serverustar jojojojo