From 657f3e333c0cce4e88581ede61f2a7b20392a153 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sat, 13 Oct 2007 20:26:04 +0000 Subject: Fixed bug #170 (hopefully, please check!) ... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1378 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/distro-specs/debian/functions-3.1 | 21 ++++++++++++++++++++- initramfs/distro-specs/debian/functions-default | 14 ++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) (limited to 'initramfs') diff --git a/initramfs/distro-specs/debian/functions-3.1 b/initramfs/distro-specs/debian/functions-3.1 index c3be9a30..f7e2b2ee 100644 --- a/initramfs/distro-specs/debian/functions-3.1 +++ b/initramfs/distro-specs/debian/functions-3.1 @@ -12,4 +12,23 @@ # Configuration script for Debian Sarge (3.1) to setup linux stateless clients # (executed within initial ramfs) -# nothing changed yet from default +# make a runlevel script +d_mkrlscript () { +local switch=$1 +local name=$2 +local info=$3 +case "$1" in + init) + echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/$name created \ +by $0\n# after you applied changes to the creation scripts you have to \ +rerun\n# the mkdxsinitrd script to get them applied\n\ +case \"\$1\" in\n start)\n\ +\techo -n \"$info\"" >>/mnt/etc/${D_INITDIR}/$name + chmod u+x /mnt/etc/${D_INITDIR}/$name + ;; + close) + echo -e "\techo \".\"\n\t;;\n stop)\n\techo \".\"\n\t;;\nesac\nexit\ + 0" >>/mnt/etc/${D_INITDIR}/$name + ;; +esac + diff --git a/initramfs/distro-specs/debian/functions-default b/initramfs/distro-specs/debian/functions-default index 32d4f9b6..edd665e3 100644 --- a/initramfs/distro-specs/debian/functions-default +++ b/initramfs/distro-specs/debian/functions-default @@ -55,6 +55,20 @@ d_mkrlscript () { local switch=$1 local name=$2 local info=$3 +case "$1" in + init) + echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/$name created \ +by $0\n# after you applied changes to the creation scripts you have to \ +rerun\n# the mkdxsinitrd script to get them applied\n\ +. /lib/lsb/init-functions\ncase \"\$1\" in\n start)\n\ +\tlog_begin_msg \"$info\"" >>/mnt/etc/${D_INITDIR}/$name + chmod u+x /mnt/etc/${D_INITDIR}/$name + ;; + close) + echo -e "\tlog_end_msg \$?\n\t;;\n stop)\n\tlog_end_msg \$?\n\t;;\ + \nesac\nexit 0" >>/mnt/etc/${D_INITDIR}/$name + ;; +esac } # group of functions for the normal runlevels - first parameter is start -- cgit v1.2.3-55-g7522