From: Joachim Wiedorn Date: Thu, 18 Nov 2010 21:40:18 +0000 (+0100) Subject: Add update-lilo script with manpage X-Git-Tag: debian/23.1-1~27 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=31d195a1d1de7cda4a16014832a0a0e749454657;p=rrq%2Fmaintain_lilo.git Add update-lilo script with manpage --- diff --git a/debian/changelog b/debian/changelog index 13b1485..6aaed9f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,7 @@ lilo (1:23.1-1) unstable; urgency=low * Remove configured link update-lilo to liloconfig. * Remove some obsolete manpages. * Move script liloconfig into directory debian/scripts. + * Add new script update-lilo and its manual page. -- Joachim Wiedorn Thu, 18 Nov 2010 20:32:02 +0100 diff --git a/debian/manpages/pod2manpage b/debian/manpages/pod2manpage new file mode 100644 index 0000000..7ee184c --- /dev/null +++ b/debian/manpages/pod2manpage @@ -0,0 +1,80 @@ +#!/bin/bash +# +# pod2manpage - convert pod file into manual page +# +# Copyright 2009-2010 Joachim Wiedorn +# +# This program 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. +# +# 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 +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. + +set -e + +if ! test /usr/bin/pod2man; then + echo "$0: Programm pod2man not found on the system!" + echo "$0: Please install perl (>= 5.6.0) on your system." + exit 1 +fi + +if test -z "$1"; then + echo "Usage: $0 " + echo "" + echo " The file manpage.pod needs a header with six lines:" + echo " =for header" + echo " manpage: " + echo " section: " + echo " title: " + echo " version: <version number>" + echo " datum: <modification date>" + echo "" + exit 0 +fi + +if ! test -e "$1"; then + echo "$0: File $1 not found - Abort!" + exit 1 +fi + +NAME=`echo "$1" | sed -e 's/\.pod$//g'` +if ! test -e "${NAME}.pod"; then + echo "$0: File $1 is not a podfile - Abort!" + exit 1 +fi + +# read file header +SUCH=manpage +manpage=$(head -n7 "$1" | grep $SUCH | sed -e "s/\.*${SUCH}\:\ *\(.*\)/\1/") +SUCH=section +section=$(head -n7 "$1" | grep $SUCH | sed -e "s/\.*${SUCH}\:\ *\(.*\)/\1/") +SUCH=title +title=$(head -n7 "$1" | grep $SUCH | sed -e "s/\.*${SUCH}\:\ *\(.*\)/\1/") +SUCH=version +version=$(head -n7 "$1" | grep $SUCH | sed -e "s/\.*${SUCH}\:\ *\(.*\)/\1/") +SUCH=datum +datum=$(head -n7 "$1" | grep $SUCH | sed -e "s/\.*${SUCH}\:\ *\(.*\)/\1/") + +# check for utf8 encoding +mycoding="" +if [ `head -n20 $1 | grep ^=encoding | grep -c -i utf` -eq 1 ]; then + mycoding="--utf8" +fi + +# convert pod to manpage +pod2man --section="$section" --center "$title" \ + --release="$version" --date="$datum" ${mycoding} \ + ${NAME}.pod ${NAME}.${section} + +#man ./${NAME}.${section} +echo "Manpage ${NAME}.${section} created." + diff --git a/debian/manpages/update-lilo.8 b/debian/manpages/update-lilo.8 new file mode 100644 index 0000000..f608786 --- /dev/null +++ b/debian/manpages/update-lilo.8 @@ -0,0 +1,106 @@ +.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.07) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" ======================================================================== +.\" +.IX Title "UPDATE-LILO 8" +.TH UPDATE-LILO 8 "2010-07-24" "23.0" "lilo documentation" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +update\-lilo \- short description +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +means a example usage (with all options) +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +contains a long description of what the program does and lists functions +.SH "OPTIONS" +.IX Header "OPTIONS" +show each option and deklare there sense +.SH "DIAGNOSTICS" +.IX Header "DIAGNOSTICS" +show some ways of diagnostics +.SH "EXAMPLES" +.IX Header "EXAMPLES" +show some examples for using +.SH "COPYRIGHT and LICENSE" +.IX Header "COPYRIGHT and LICENSE" +Copyright (C) 2010 Joachim Wiedorn +.PP +This script is free software; you can redistribute it and/or modify +it under the terms of the \s-1GNU\s0 General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +.PP +On Debian systems, the complete text of the \s-1GNU\s0 General Public +License version 2 can be found in `/usr/share/common\-licenses/GPL\-2'. +.SH "AUTHOR" +.IX Header "AUTHOR" +\&\fBlilo-uuid-diskid\fR was written by Joachim Wiedorn. +.PP +This manual page was written by Joachim Wiedorn <ad_debian at joonet.de> +for the Debian project (and may be used by others). +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fBlilo\fR(8), \fBlilo-uuid-diskid\fR(1). diff --git a/debian/manpages/update-lilo.pod b/debian/manpages/update-lilo.pod new file mode 100644 index 0000000..3e6856e --- /dev/null +++ b/debian/manpages/update-lilo.pod @@ -0,0 +1,45 @@ +=for header +manpage: UPDATE-LILO +section: 8 +title: lilo documentation +version: 23.0 +datum: 2010-07-24 + +=encoding utf8 + +=head1 NAME + +update-lilo - execute lilo in special debconf mode + +=head1 SYNOPSIS + +B<update-lilo> + +=head1 DESCRIPTION + +This special script only execute lilo with sending all output to >$2 + +=head1 COPYRIGHT and LICENSE + +Copyright (C) 2010 Joachim Wiedorn + +This script 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. + +On Debian systems, the complete text of the GNU General Public +License version 2 can be found in `/usr/share/common-licenses/GPL-2'. + +=head1 AUTHOR + +B<update-lilo> was written by Joachim Wiedorn. + +This manual page was written by Joachim Wiedorn <ad_debian at joonet.de> +for the Debian project (and may be used by others). + +=head1 SEE ALSO + +B<lilo>(8), B<lilo-uuid-diskid>(1). + +=cut diff --git a/debian/scripts/update-lilo b/debian/scripts/update-lilo new file mode 100644 index 0000000..6fb303e --- /dev/null +++ b/debian/scripts/update-lilo @@ -0,0 +1,30 @@ +#!/bin/sh + +# update-lilo - execute lilo in special debconf mode +# +# Copyright 2010 Joachim Wiedorn <ad_debian at joonet.de> +# +# This program 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. +# +# 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 +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. + +set -e + +# Run the boot loader installer. Sending STDOUT to STDERR +# to avoid confusing debconf, which has redirected STDOUT. +if [ -f /etc/lilo.conf ];then + lilo >&2 +fi + +# end of file