summaryrefslogtreecommitdiffstats
path: root/initramfs/distro-specs/debian/functions-3.1
blob: f7e2b2ee634fe0e78b4992ce2e3a3567ee200448 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright (c) 2003 - 2006 - RZ Uni Freiburg
# Copyright (c) 2006, 2007 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
#
# If you have any feedback please consult http://openslx.org/feedback and
# send your feedback to feedback@openslx.org
#
# General information about OpenSLX can be found at http://openslx.org
#
# Configuration script for Debian Sarge (3.1) to setup linux stateless clients
# (executed within initial ramfs)

# 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