From ec845af0e4bc9735cb3c7212e02c4c341260fc27 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sun, 19 Jul 2009 13:45:35 +0000 Subject: Adding component to d_mkrlscript for distro-specific creation of entries, e.g. to add a line to boot.slx: "d_mkrlscript entry boot.slx "uclibc-wrapper mount ..." git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3020 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/distro-specs/debian/functions-default | 9 ++++++--- initramfs/distro-specs/scilin/functions-default | 3 +++ initramfs/distro-specs/suse/functions-default | 9 +++++---- initramfs/distro-specs/ubuntu/functions-default | 6 ++++-- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/initramfs/distro-specs/debian/functions-default b/initramfs/distro-specs/debian/functions-default index 20799eea..0896360c 100644 --- a/initramfs/distro-specs/debian/functions-default +++ b/initramfs/distro-specs/debian/functions-default @@ -102,12 +102,15 @@ d_mkrlscript () { 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/init.d/$name - chmod u+x /mnt/etc/init.d/$name +\tlog_begin_msg \"${info}\"" >>/mnt/etc/init.d/${name} + chmod u+x /mnt/etc/init.d/${name} ;; + entry) + echo -e "\t${info}" >>/mnt/etc/init.d/${name} + ;; close) echo -e "\tlog_end_msg \$?\n\t;;\n stop)\n\tlog_end_msg \$?\n\t;;\ - \nesac\nexit 0" >>/mnt/etc/init.d/$name + \nesac\nexit 0" >>/mnt/etc/init.d/${name} ;; esac } diff --git a/initramfs/distro-specs/scilin/functions-default b/initramfs/distro-specs/scilin/functions-default index e520e35c..e650940b 100644 --- a/initramfs/distro-specs/scilin/functions-default +++ b/initramfs/distro-specs/scilin/functions-default @@ -302,6 +302,9 @@ rerun\n# the mkdxsinitrd script to get them applied\n\ \"\$1\" in\n start)\n\techo -n \"$info\"" >>/mnt/etc/init.d/${name} chmod u+x /mnt/etc/init.d/${name} ;; + entry) + echo -e "\t${info}" >>/mnt/etc/init.d/${name} + ;; close) echo -e "\t;;\n stop)\n\t;;\nesac" \ >>/mnt/etc/init.d/${name} diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default index d27d5623..81f67e14 100644 --- a/initramfs/distro-specs/suse/functions-default +++ b/initramfs/distro-specs/suse/functions-default @@ -475,10 +475,8 @@ dlocale () { echo -e "\t# entries added by $0: $date" >> /mnt/etc/init.d/boot.slx sed -e "s,KEYTABLE=.*,KEYTABLE=\"${KEYTABLE}\"," \ -i /mnt/etc/sysconfig/keyboard -echo -e "\t#loadkeys ${KEYTABLE} >${LOGFILE} 2>&1\n" \ - >>/mnt/etc/init.d/boot.slx -echo -e "\t#setfont ${CONSOLE_FONT} >${LOGFILE} 2>&1\n" \ - >>/mnt/etc/init.d/boot.slx +d_mkrlscript entry boot.slx "#loadkeys ${KEYTABLE} >${LOGFILE} 2>&1" +d_mkrlscript entry boot.slx "#setfont ${CONSOLE_FONT} >${LOGFILE} 2>&1" sed -e "s,RC_LANG=.*,RC_LANG=\"${LANG}\" # added in initrd," \ -i /mnt/etc/sysconfig/language } @@ -593,6 +591,9 @@ rerun\n# the mkdxsinitrd script to get them applied\n\ \"\$1\" in\n start)\n\techo -n \"$info\"" >>/mnt/etc/init.d/${name} chmod u+x /mnt/etc/init.d/${name} ;; + entry) + echo -e "\t${info}" >>/mnt/etc/init.d/${name} + ;; close) echo -e "\trc_status -v\n\t;;\n stop)\n\t;;\nesac\nrc_exit" \ >>/mnt/etc/init.d/${name} diff --git a/initramfs/distro-specs/ubuntu/functions-default b/initramfs/distro-specs/ubuntu/functions-default index ee3a151e..f3882239 100644 --- a/initramfs/distro-specs/ubuntu/functions-default +++ b/initramfs/distro-specs/ubuntu/functions-default @@ -129,8 +129,7 @@ dlocale () { # fixme -- use keytable setup script here # echo -e "\t# entries added by $0: $date" >> /mnt/etc/init.d/boot.slx sed "s/LANG.*/LANG=\"${LANG}\"/" -i /mnt/etc/default/locale -#echo -e "\tsetfont ${CONSOLE_FONT} >${LOGFILE} 2>&1" \ -# >>/mnt/etc/init.d/boot.slx +#d_mkrlscript entry boot.slx "setfont ${CONSOLE_FONT} >${LOGFILE} 2>&1" } # group of functions for the normal runlevels - first parameter is start @@ -252,6 +251,9 @@ rerun\n# the mkdxsinitrd script to get them applied\n\n\ >>/mnt/etc/init.d/$name chmod u+x /mnt/etc/init.d/$name ;; + entry) + echo -e "\t${info}" >>/mnt/etc/init.d/${name} + ;; close) echo -e "\tlog_end_msg 0\n\t;;\n stop)\n\t;;\nesac\nexit 0" \ >>/mnt/etc/init.d/$name -- cgit v1.2.3-55-g7522