summaryrefslogtreecommitdiffstats
path: root/initrd/distro-specs/gentoo/functions-2005.1
blob: 7852853c29ee77ef93e6a4abeddccab3d88c91f8 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Description:  configuration script for Ubuntu V5.10 to configure
#		linux diskless clients (executed within initial
#		ramdisk after genconfig) 
#
# Author(s):    Dirk von Suchodoletz <dirk@goe.net>, 31-03-2006
#
# Copyright:    (c) 2006 - RZ Universitaet Freiburg
# 
# Version:      0.0.1d

# distro specific stuff to initialize
preinit () {
 :
}

postinit () {
  :
}

# distro specific general function called from servconfig script
config_distro () {
echo -e "dxs version 4.0a\initramfs generation date $date" \
  >> /mnt/etc/gentoo-release
}

# udev service - not checked!
udev_hotplug () {
echo "Starting udev"
ln -s /bin/udevd /bin/udevstart && udevstart &
if [ -x /bin/udevd ] ; then
  export UDEVD_EXPECTED_SEQNUM=$(cat /sys/kernel/hotplug_seqnum)
  export UDEVD_EVENT_TIMEOUT=1
  echo "" > /proc/sys/kernel/hotplug
  udevd &
else error "  udev daemon is not available. Some devices might not \
apprear." nonfatal
fi
}

# initialize boot.ld - skript to be executed during early system startup
# (before most of the normal boot init scripts)
# this script should operate like a normal runlevel script
# initialize boot.ld - skript to be executed during early system startup
# (before most of the normal boot init scripts)
# this script should operate like a normal runlevel script (fixme!!)
d_mkrlscript () {
local switch="$1"
local name="$2"
local info="$3"
case "$switch" in
  init)
    echo -e "#!/sbin/runskript\n# skeleton of /etc/${D_INITDIR}/$name \
generated by $0" >/mnt/etc/${D_INITDIR}/$name
    echo -e "\n\nstart() {\tebegin \"$info\"" \
      >>/mnt/etc/${D_INITDIR}/$name
    chmod u+x /mnt/etc/${D_INITDIR}/$name
  ;;
  close)
    echo -e "\t;;\n    stop)\n\t;;\nesac\nexit 0" \
      >>/mnt/etc/${D_INITDIR}/$name
  ;;
esac
}