summaryrefslogtreecommitdiffstats
path: root/initramfs/distro-specs/gentoo
diff options
context:
space:
mode:
authorDirk von Suchodoletz2007-02-01 15:42:43 +0100
committerDirk von Suchodoletz2007-02-01 15:42:43 +0100
commit0e8a9f43c6275fb97964769c526f547a630006cf (patch)
treee43ce97b7d14bca5e40b09eeaaeae736efee337a /initramfs/distro-specs/gentoo
parentGot onto the proper track: Gentoo is somehow (incompletely) booting now. (diff)
downloadcore-0e8a9f43c6275fb97964769c526f547a630006cf.tar.gz
core-0e8a9f43c6275fb97964769c526f547a630006cf.tar.xz
core-0e8a9f43c6275fb97964769c526f547a630006cf.zip
Further improvement of Gentoo start. Generating special boot file for
initial mount setup ... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@666 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/distro-specs/gentoo')
-rw-r--r--initramfs/distro-specs/gentoo/files-default/etc/group37
-rw-r--r--initramfs/distro-specs/gentoo/functions-default97
2 files changed, 68 insertions, 66 deletions
diff --git a/initramfs/distro-specs/gentoo/files-default/etc/group b/initramfs/distro-specs/gentoo/files-default/etc/group
deleted file mode 100644
index bd56b164..00000000
--- a/initramfs/distro-specs/gentoo/files-default/etc/group
+++ /dev/null
@@ -1,37 +0,0 @@
-root::0:root
-bin::1:root,bin,daemon
-daemon::2:root,bin,daemon
-sys::3:root,bin,adm
-adm::4:root,adm,daemon
-tty::5:
-disk::6:root,adm
-lp::7:lp
-mem::8:
-kmem::9:
-wheel::10:root,test
-floppy::11:root
-mail::12:mail
-news::13:news
-uucp::14:uucp
-man::15:man
-console::17:
-audio::18:test
-cdrom::19:
-dialout::20:root
-tape::26:root
-video::27:root
-cdrw::80:
-usb::85:
-users::100:games,test
-nofiles:x:200:
-smmsp:x:209:smmsp
-portage::250:portage
-utmp:x:406:
-nogroup::65533:
-nobody::65534:
-sshd:x:22:
-cron:x:16:
-test:x:1000:
-lpadmin:x:106:
-vmware:x:1001:
-rpc:x:111:
diff --git a/initramfs/distro-specs/gentoo/functions-default b/initramfs/distro-specs/gentoo/functions-default
index b8eba655..998c0a74 100644
--- a/initramfs/distro-specs/gentoo/functions-default
+++ b/initramfs/distro-specs/gentoo/functions-default
@@ -42,7 +42,7 @@ local script="$1"
local after="$2"
# empty runlevel links - decision on running certain services is
# passed via configuration
-if strinstr "$1" " ${D_INITSCRIPTS} " ; then
+if strinstr "$1" "boot boot.ld ${D_INITSCRIPTS}" ; then
ln -s /etc/${D_INITDIR}/$1 /mnt/etc/runlevels/boot/$1
echo $1 >> /mnt/etc/runlevels/boot/.critical
else
@@ -68,13 +68,35 @@ echo -e "\tafter $1\n}" >> /tmp/sedscript
# setup initial boot scripts (rather strange concept I did not get
# completely)
initial_boot () {
-local after=""
+after=""
local script
-for script in ${D_INITSCRIPTS}; do
+d_mkrlscript init boot "Starting Gentoo base initialization"
+cat >>/mnt/etc/${D_INITDIR}/boot <<EOF
+ #"Mounting /proc, /sys and /dev/pts filesystems"
+ # file /etc/fstab in some scenarios not available
+ mount -t proc proc /proc &>/dev/null
+ mount -t devpts -o mode=0620,gid=5 devpts /dev/pts
+ if [ -d /sys ] ; then
+ while read a b c ; do
+ case "\$b" in
+ sysfs)
+ #echo -n "Mounting /sys filesystem"
+ echo -e "sysfs\t\t/sys\t\tsysfs\t\trw\t\t 0 0\n" >>/etc/fstab
+ mount -t sysfs sysfs /sys
+ ret=0
+ break
+ ;;
+ esac
+ done < /proc/filesystems
+ fi
+ eend \${ret} "\${errstr}"
+EOF
+d_mkrlscript close boot
+
+for script in boot boot.ld "${D_INITSCRIPTS}" ; do
ln -sf /etc${D_INITDIR}/$i /mnt/etc/${D_INITBOOTD}/$i
# to get a certain order of scripts the after token of depends () might be
# used
- echo "Linking $script"
rllinker "$script" "$after"
after=$script
done
@@ -94,7 +116,7 @@ local name="$2"
local info="$3"
case "$switch" in
init)
- echo -e "#!/sbin/runskript\n# skeleton of /etc/${D_INITDIR}/$name \
+ echo -e "#!/sbin/runscript\n# skeleton of /etc/${D_INITDIR}/$name \
generated by $0\ndepend() {\n\t:\n}" >/mnt/etc/${D_INITDIR}/$name
echo -e "\n\nstart() {\n\tebegin \"$info\"" \
>>/mnt/etc/${D_INITDIR}/$name
@@ -175,30 +197,46 @@ if [ "x$start_snmp" = "xyes" ] ; then
rllinker "snmpd"
testmkd /mnt/var/lib/net-snmp >/dev/null 2>&1
fi
- # fixme!!
- # write service monitor depending on services started
- fi
-}
-
-# configure X display manager (runlevel links and kind of manager)
-config_xdm () {
-if [ -f /mnt/etc/${D_INITDIR}/xdm ] ; then
- sed -e "s,DISPLAYMANAGER=.*,DISPLAYMANAGER=\"xdm\"," -i /mnt/etc/rc.conf
- ln -s /etc/${D_INITDIR}/xdm /mnt/etc/runlevels/boot/xdm
- ln -s /etc/${D_INITDIR}/xdm /mnt/etc/runlevels/default/xdm
+ # fixme!!
+ # write service monitor depending on services started
fi
}
-# change entries in rc.conf (most for convenience only)
+# change entries in rc.conf (mostly for convenience only)
config_rc_entry () {
local var=$1
local value=$2
sed -e "s,$var=.*,$var=\"$value\"," -i /mnt/etc/rc.conf
}
+# general display manager stuff
+config_dm_entry () {
+local displmng=$1
+if [ -f /mnt/etc/${D_INITDIR}/${displmng} ] ; then
+ config_rc_entry "DISPLAYMANAGER" "${displmng}"
+ echo "Linking ${displmng}"
+ if [ "x$late_dm" = "xyes" ] ; then
+ rllinker ${displmng}
+ else
+ D_INITSCRIPTS="${D_INITSCRIPTS} ${displmng}"
+ rllinker ${displmng} localmount
+ fi
+else
+ error "" nonfatal
+fi
+}
+
+
+# configure X display manager (runlevel links and kind of manager)
+config_xdm () {
+# runlevel and config stuff
+config_dm_entry xdm
+}
+
# configure gdm
config_gdm () {
-config_rc_entry "DISPLAYMANAGER" "gdm"
+# runlevel stuff
+config_dm_entry gdm
# fixme!! check for needed directories and permissions
#testmkd /mnt/var/lib/gdm
#testmkd /mnt/var/log/gdm
@@ -207,27 +245,28 @@ config_rc_entry "DISPLAYMANAGER" "gdm"
# hack - gdm should be user 50 and shadow group 15
#chown 50:15 /mnt/var/lib/gdm /mnt/var/log/gdm
#chmod 0750 /mnt/var/lib/gdm /mnt/var/log/gdm
-#rllinker "gdm" ??
}
# configure kdm as display manager
config_kdm () {
-# first define directories for kdm
-#kdmrcdir=/etc/opt/kde3/share/config/kdm
-#xdmdir=/etc/X11/xdm
-
-#testmkd /mnt/${kdmrcdir}
+config_dm_entry kdm
-config_rc_entry "DISPLAYMANAGER" "kdm"
+# first define directories for kdm
+kdmrcdir=/etc/opt/kde3/share/config/kdm
+xdmdir=/etc/X11/xdm
+testmkd /mnt/${kdmrcdir}
-# write configuration file
-# use general config in /etc/functions
-#config_kdm_template
+# write configuration file while using general config in /etc/functions
+config_kdm_template
}
# configure bluetooth services
config_bt () {
-rllinker "bluetooth"
+if [ -f /mnt/etc/init.d/bluetooth ] ; then
+ rllinker "bluetooth"
+else
+ error "" nonfatal
+fi
}
# set consolefont