From d31d9ae029a99c23fcb30bdaa5f60f25bf78d447 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sat, 13 Oct 2007 18:52:38 +0000 Subject: More fixes and cleanups for SuSE. Strange location of kdmrc in Gentoo!?!? git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1376 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/distro-specs/gentoo/functions-default | 3 ++- initramfs/distro-specs/suse/functions-10.0 | 17 +++++++++++++++++ initramfs/distro-specs/suse/functions-10.1 | 18 ++++++++++++++++++ initramfs/distro-specs/suse/functions-10.3 | 13 +++++++++++++ initramfs/distro-specs/suse/functions-9.3 | 17 +++++++++++++++++ initramfs/distro-specs/suse/functions-default | 18 ++++++++++++------ 6 files changed, 79 insertions(+), 7 deletions(-) (limited to 'initramfs') diff --git a/initramfs/distro-specs/gentoo/functions-default b/initramfs/distro-specs/gentoo/functions-default index f4fa6d2b..363d35b3 100644 --- a/initramfs/distro-specs/gentoo/functions-default +++ b/initramfs/distro-specs/gentoo/functions-default @@ -276,7 +276,8 @@ xdmdir=/etc/X11/xdm testmkd /mnt/${kdmrcdir} # setting the path for kdmrc-file -# FIXME: hack - there is no other way in gentoo?!? +# FIXME: hack - there is no other way in gentoo?!? Why the hell in "themes" +# directory?? sed -e 's,\(PIDFILE:.*\)|| \\$,\1 -- -config /var/lib/openslx/themes/displaymanager/kdmrc || \\,g'\ -i /mnt/etc/X11/startDM.sh diff --git a/initramfs/distro-specs/suse/functions-10.0 b/initramfs/distro-specs/suse/functions-10.0 index 79e1043c..b67df02b 100644 --- a/initramfs/distro-specs/suse/functions-10.0 +++ b/initramfs/distro-specs/suse/functions-10.0 @@ -34,6 +34,23 @@ PROGRAM=\"/var/X11R6/bin/vm-udev\", OPTIONS=\"ignore_device\"\n\ SUBSYSTEM==\"usb\", ACTION==\"remove\", PROGRAM=\"/var/X11R6/bin/vm-udev\"" \ >> /mnt/etc/udev/rules.d/01-udev-vm.rules } +# secure shell service +config_sshd () { +if [ "x$start_sshd" = "xyes" ] ; then + if [ -f /mnt/etc/${D_INITDIR}/sshd ] ; then + testmkd /mnt/var/lib/sshd + testmkd /mnt/var/lib/empty + if ! strinfile "sshd:" /mnt/etc/passwd ; then + echo -e "sshd:x:71:65::/var/run/sshd:/bin/false" \ + >>/mnt/etc/passwd + echo -e "sshd:!:13099:0:99999:7:::" >>/mnt/etc/shadow + fi + rllinker "sshd" 25 10 + else + error "$df_errsshd" nonfatal + fi +fi +} # Xorg variable settings. Lots of stuff changes for newer Xorg servers displayvars () { synapticsdrv="/usr/X11R6/lib/modules/input/synaptics_drv.o" diff --git a/initramfs/distro-specs/suse/functions-10.1 b/initramfs/distro-specs/suse/functions-10.1 index 424819e6..aa553a2d 100644 --- a/initramfs/distro-specs/suse/functions-10.1 +++ b/initramfs/distro-specs/suse/functions-10.1 @@ -132,6 +132,24 @@ case "${XMODULE}" in esac } +# secure shell service +config_sshd () { +if [ "x$start_sshd" = "xyes" ] ; then + if [ -f /mnt/etc/${D_INITDIR}/sshd ] ; then + testmkd /mnt/var/lib/sshd + testmkd /mnt/var/lib/empty + if ! strinfile "sshd:" /mnt/etc/passwd ; then + echo -e "sshd:x:71:65::/var/run/sshd:/bin/false" \ + >>/mnt/etc/passwd + echo -e "sshd:!:13099:0:99999:7:::" >>/mnt/etc/shadow + fi + rllinker "sshd" 25 10 + else + error "$df_errsshd" nonfatal + fi +fi +} + # Xorg variable settings. Lots of stuff changes for newer Xorg servers displayvars () { synapticsdrv="/usr/X11R6/lib/modules/input/synaptics_drv.o" diff --git a/initramfs/distro-specs/suse/functions-10.3 b/initramfs/distro-specs/suse/functions-10.3 index e59e1c84..4afaff8d 100644 --- a/initramfs/distro-specs/suse/functions-10.3 +++ b/initramfs/distro-specs/suse/functions-10.3 @@ -13,6 +13,19 @@ # defined in general SuSE base definitions ... General changes should be done # there, version specific changes for the 10.3 go here. +# display manager configuration +config_kdm () { +# first define directories for kdm +kdmrcdir=/etc/opt/kde3/share/config/kdm +xdmdir=/etc/X11/xdm +# use different kdmrc than default, since 10.2 in /opt/kde/... +echo 'XDMOPTIONS="-config /etc/opt/kde3/share/config/kdm/kdmrc"' \ + >> /mnt/etc/sysconfig/displaymanager +testmkd /mnt/${kdmrcdir} +config_dm_entry yes +# write configuration file with general config from /etc/functions +config_kdm_template +} # config nfsv4 config_nfsv4 () { if [ "x$start_nfsv4" = "xyes" ]; then diff --git a/initramfs/distro-specs/suse/functions-9.3 b/initramfs/distro-specs/suse/functions-9.3 index fdfc8b07..d4c40422 100644 --- a/initramfs/distro-specs/suse/functions-9.3 +++ b/initramfs/distro-specs/suse/functions-9.3 @@ -59,6 +59,23 @@ if [ "x$start_dreshal" = "xyes" ]; then fi fi } +# secure shell service +config_sshd () { +if [ "x$start_sshd" = "xyes" ] ; then + if [ -f /mnt/etc/${D_INITDIR}/sshd ] ; then + testmkd /mnt/var/lib/sshd + testmkd /mnt/var/lib/empty + if ! strinfile "sshd:" /mnt/etc/passwd ; then + echo -e "sshd:x:71:65::/var/run/sshd:/bin/false" \ + >>/mnt/etc/passwd + echo -e "sshd:!:13099:0:99999:7:::" >>/mnt/etc/shadow + fi + rllinker "sshd" 20 10 + else + error "$df_errsshd" nonfatal + fi +fi +} # Xorg variable settings. Lots of stuff has changed for newer Xorg servers displayvars () { synapticsdrv="/usr/X11R6/lib/modules/input/synaptics_drv.o" diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default index a5514975..8e11b81d 100644 --- a/initramfs/distro-specs/suse/functions-default +++ b/initramfs/distro-specs/suse/functions-default @@ -51,8 +51,6 @@ ln -sf ../halt /mnt/etc/${D_INITDIR}/rc6.d/S20reboot # running stuff in parallel seems to be rather useless and generates some # difficult to solve problems. If you want to try nevertheless enable the # following line and disable the latter one (switching off that feature) -#sed -e "s,TARGETS =,TARGETS = xdm boot.slx," \ -# -i /mnt/etc/${D_INITDIR}/.depend.boot sed -e "s,RUN_PARALLEL=.*,RUN_PARALLEL=\"no\"," \ -i /mnt/etc/${D_SYSCONFDIR}/boot # if YaST2 should be runnable (without much effect anyway) on the client @@ -137,9 +135,17 @@ fi config_sshd () { if [ "x$start_sshd" = "xyes" ] ; then if [ -f /mnt/etc/${D_INITDIR}/sshd ] ; then - testmkd /mnt/var/lib/sshd + testmkd /mnt/var/run/sshd testmkd /mnt/var/lib/empty - rllinker "sshd" 12 10 + if ! strinfile "sshd:" /mnt/etc/passwd ; then + echo -e "sshd:x:117:65534::/var/run/sshd:/usr/sbin/nologin" \ + >>/mnt/etc/passwd + echo -e "sshd:!:13099:0:99999:7:::" >>/mnt/etc/shadow + fi + # set permissions with userid + #echo -e "\tchown sshd:nogroup /var/run/sshd /var/lib/empty 2>/dev/null" \ + # >>/mnt/etc/${D_INITDIR}/boot.slx + rllinker "sshd" 25 10 else error "$df_errsshd" nonfatal fi @@ -164,12 +170,12 @@ if [ "x${start_printdaemon}" != "x" ] && \ yes|cups*|CUPS*) rllinker "cups" 25 1 testmkd /mnt/var/spool/cups/tmp - chown -R lp:lp /var/spool/cups + #chown -R lp:lp /var/spool/cups ;; lp*|LP*|PLP*) rllinker "lpd" 25 1 testmkd /mnt/var/spool/lpd - chown -R lp:lp /var/spool/lpd + #chown -R lp:lp /var/spool/lpd ;; *) #logwrite "Do not know print-server $start_printdaemon; \ -- cgit v1.2.3-55-g7522