]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- support for interactive starting
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 8 Mar 2000 16:29:11 +0000 (16:29 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 8 Mar 2000 16:29:11 +0000 (16:29 +0000)
svn-id: @664

po/pl.po
rc.d/init.d/functions
rc.d/rc
rc.d/rc.sysinit
sysconfig/system

index 92fdf23bef22be942ce3ffca66d62e4df32a59db..b6458346b5cff2e4bce56a006b9e1680aa4628d8 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,7 +1,7 @@
 # Polish translation of rc-scripts.
 # Copyright (C) 1999 Free Software Foundation, Inc.
 # Arkadiusz Miskiewicz <misiek@pld.org.pl>, 1999.
-# $Id: pl.po,v 1.16 2000/02/17 10:59:14 misiek Exp $
+# $Id: pl.po,v 1.17 2000/03/08 16:29:10 misiek Exp $
 #
 msgid ""
 msgstr ""
@@ -287,6 +287,33 @@ msgstr "Ladowanie podstawowy font systemowy"
 msgid "Setting up /etc/ld.so.cache"
 msgstr "Ustawienie /etc/ld.so.cache"
 
+msgid "Entering interactive startup"
+msgstr "Wchodze w tryb interaktywny"
+
+msgid "Entering non-interactive startup"
+msgstr "Wchodze w tryb nie interaktywny"
+
+msgid "Press"
+msgstr "Prosze wcisnac"
+
+msgid "to enter interactive startup."
+msgstr "by wejsc w tryb interaktywny."
+
+msgid "Starting Device Filesystem Daemon"
+msgstr "Startuje Zarzadce Systemu Plikow Urzadzen (DevFsd)"
+
+msgid "Turning off Magic SysRq key"
+msgstr "Wylaczam klawisz Magic SysRq"
+
+msgid "Turning off Stop-A/Break-A"
+msgstr "Wylaczam klawisz Stop-A/Break-A"
+
+msgid "Start service"
+msgstr "Wystartowac usluge"
+
+msgid "(Y)es/(N)o/(C)ontinue? [Y] "
+msgstr "(T)ak/(N)ie/(K)ontynuj? [T] "
+
 # Translation of words: "DONE", "WORK", "BUSY", "FAIL", "DIED"
 # must have that same count of letters !!!!!!!!!!!!!!!!!!!!!!!
 # (4 + "\b" * count of letters) in one of five previous words
index e2495de1efffbfd5dc116b0250c6b54129ae5de6..d58aa8c919e9aede196b46467d579beeb7930e22 100644 (file)
@@ -1,7 +1,7 @@
 # functions    This file contains functions to be used by most or all
 #              shell scripts in the /etc/init.d directory.
 #
-# $Id: functions,v 1.37 2000/03/08 15:43:07 zagrodzki Exp $
+# $Id: functions,v 1.38 2000/03/08 16:29:10 misiek Exp $
 #
 # Author:      Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 # Hacked by:    Greg Galloway and Marc Ewing
@@ -103,26 +103,31 @@ show()
 
 busy() 
 {
+       termput hpa 67
        echo -n "`termput setaf 6`[`termput setaf 5` `nls --nls-domain rc-scripts "BUSY"` `termput setaf 6`]`termput setaf 7`"
 }
 
 ok() 
 {
+       termput hpa 67
        echo  "`termput setaf 6`[`termput setaf 2` `nls --nls-domain rc-scripts "DONE"` `termput setaf 6`]`termput setaf 7`"
 }
 
 started()
 {
+       termput hpa 67
        echo  "`termput setaf 6`[`termput setaf 2` `nls --nls-domain rc-scripts "WORK"` `termput setaf 6`]`termput setaf 7`"
 }
 
 fail() 
 {
+       termput hpa 67
        echo  "`termput setaf 6`[`termput setaf 1` `nls --nls-domain rc-scripts "FAIL"` `termput setaf 6`]`termput setaf 7`"
 }
 
 died() 
 {
+       termput hpa 67
        echo  "`termput setaf 6`[`termput setaf 1` `nls --nls-domain rc-scripts "DIED"` `termput setaf 6`]`termput setaf 7`"
 }
 
@@ -329,6 +334,27 @@ status()
        return 3
 }
 
+# Confirm whether we really want to run this service
+confirm() {
+       echo -n "`nls "Start service"` $1 `nls "(Y)es/(N)o/(C)ontinue? [Y] "`"
+       read answer
+       case $answer in
+               y|Y|t|T|"")
+                       return 0
+               ;;
+               c|C|k|K)
+                       return 2
+               ;;
+               n|N)
+                       return 1
+               ;;
+               *)
+                       confirm $1
+                       return $?
+               ;;
+       esac
+}
+
 is_yes()
 {
        # Test syntax   
diff --git a/rc.d/rc b/rc.d/rc
index 49d919762d9e05f53db91361ca868ac1a975fe26..c8b971c70591f87d63d964e97b6f54532d2a2509 100755 (executable)
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -5,7 +5,7 @@
 #               responsible for the very first setup of basic
 #               things, such as setting the hostname.
 #
-# $Id: rc,v 1.16 2000/01/04 17:23:39 baggins Exp $
+# $Id: rc,v 1.17 2000/03/08 16:29:09 misiek Exp $
 #
 # Original Author:       
 #               Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
@@ -63,6 +63,19 @@ else
        [ "$runlevel" = "$previous" ] && exit 0
 fi
 
+# See if we want to be in user confirmation mode
+if [ "$previous" = "N" ]; then
+       if grep -qi confirm /proc/cmdline >/dev/null \
+               || [ -f /var/run/confirm ]; then
+               rm -f /var/run/confirm
+               CONFIRM="yes"
+               nls "Entering interactive startup"
+       else
+               CONFIRM=
+               nls "Entering non-interactive startup"
+       fi
+fi
+                                         
 # set onlcr to avoid staircase effect and do not lock scrolling
 stty onlcr -ixon 0>&1
 
@@ -118,6 +131,23 @@ if [ -d /etc/rc.d/rc$runlevel.d ]; then
                [ -f /var/lock/subsys/$subsys ] || \
                    [ -f /var/lock/subsys/${subsys}.init ] && continue
 
+               # If we're in confirmation mode, get user confirmation
+               [ -n "$CONFIRM" ]  &&
+               {
+                       confirm $subsys
+                       case $? in
+                         0)
+                               :
+                         ;;
+                         2)
+                               CONFIRM=
+                         ;;
+                         *)
+                               continue
+                         ;;
+                       esac
+               }
+
                # Bring the subsystem up.
                $i start
        done
index 1c5d3d467d08029fcd025e7ff9e7e1f4678805b8..9487fdac255b615fcc7d14dd716c45166b486693 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # /etc/rc.d/rc.sysinit - run once at boot time
-# $Id: rc.sysinit,v 1.48 2000/02/28 12:50:45 misiek Exp $
+# $Id: rc.sysinit,v 1.49 2000/03/08 16:29:09 misiek Exp $
 #
 # Taken in part from Miquel van Smoorenburg's bcheckrc.
 # Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
@@ -53,8 +53,13 @@ else
 fi
 
 # Print welcome message
-echo -e "\t\t\t`termput setaf 6` Powered by `termput setaf 2`PLD/Linux`termput setaf 7`"
-
+echo -e "\t\t\t`termput setaf 6`Powered by `termput setaf 2`PLD GNU/Linux`termput setaf 7`"
+if [ "$PROMPT" != "no" ]; then
+       echo -en "\t\t`nls "Press"` '`termput setaf 1`I`termput setaf 7`' `nls "to enter interactive startup."`"
+       echo
+       sleep 1
+fi
+   
 # set up devfsd
 if [ -x /sbin/devfsd -a -f /etc/devfsd.conf ]; then
        if [ "$RUN_DEVFSD" = "yes" ]; then
@@ -65,6 +70,18 @@ fi
 # Set console loglevel
 /bin/dmesg -n $CONSOLE_LOGLEVEL
 
+# Turn off sysrq
+if [ -f /proc/sys/kernel/sysrq -a "$MAGIC_SYSRQ" = "no" ]; then
+        echo "0" > /proc/sys/kernel/sysrq
+       run_cmd "Turning off Magic SysRq key" /bin/true
+fi
+
+# Turn off Stop-A
+if [ -f /proc/sys/kernel/stop-a -a "$STOP_A" = "no" ]; then
+       echo "0" > /proc/sys/kernel/stop-a
+       run_cmd "Turning off Stop-A/Break-A" /bin/true
+fi
+                               
 # we need /proc mounted before starting fsck
 mount -n -t proc /proc /proc
 
@@ -323,12 +340,21 @@ if [ -x /sbin/quotaon ]; then
        run_cmd "Turning on quotas for local filesystems" /sbin/quotaon -a
 fi
 
+{
 # Clean out /etc & /var/{run/*,log/{b,w}tmpx}}.
 rm -f /etc/mtab~ /fastboot /fsckoptions /forcefsck
-rm -f /var/run/utmp  
-:>/var/run/utmpx
-chown root.utmp /var/run/utmpx
-chmod 0664 /var/run/utmpx
+
+# Clean up utmp/wtmp
+:>/var/run/utmp
+touch /var/log/wtmp
+chown root.utmp /var/run/utmp /var/log/wtmp
+chmod 0664 /var/run/utmp /var/log/wtmp
+if [ -n "$NEED_XFILES" ]; then
+       :>/var/run/utmpx
+       touch /var/log/wtmpx
+       chown root.utmp /var/run/utmpx /var/log/wtmpx
+       chmod 0664 /var/run/utmpx /var/log/wtmpx
+fi
 
 # Clean /tmp
 if [ "$CLEAN_TMP" = "yes" ]; then
@@ -424,14 +450,10 @@ if [ -f /proc/scsi/scsi ] && cat /proc/scsi/scsi | grep -q 'Type:   Sequential-A
        fi
 fi
 
-# there could be a new kernel version.  reinit /etc/psdevtab, to be sure.
+# there could be a new kernel version.  remove old psdevtab database
 rm -f /etc/psdevtab
-#if [ -x /bin/ps ]; then
-#show "Rebuilding /etc/psdevtab database"; busy
-#if (ps > /dev/null 2>&1); then deltext; ok; else deltext; fail; fi
-#fi
 
-if ([ -f /proc/sys/kernel/panic -a "$PANIC_REBOOT_TIME" -gt "0" ] 2>/dev/null); then
+if [ -f /proc/sys/kernel/panic -a "$PANIC_REBOOT_TIME" -gt "0" ]; then
 show "`nls "Sending val. %s to /proc/sys/kernel/panic" "$PANIC_REBOOT_TIME"`"; busy
 if (echo $PANIC_REBOOT_TIME > /proc/sys/kernel/panic); then deltext; ok; else deltext; fail; fi
 fi
@@ -441,5 +463,14 @@ fi
 dmesg > /var/log/dmesg
 chmod 640 /var/log/dmesg
 
+# Now that we have all of our basic modules loaded and the kernel going,
+# let's dump the syslog ring somewhere so we can find it later
+kill -TERM `/sbin/pidof getkey` >/dev/null 2>&1
+} &
+if [ "$PROMPT" != "no" ]; then
+   /sbin/getkey i && touch /var/run/confirm
+fi
+wait
+   
 # Feed entropy into the entropy pool
 /etc/rc.d/init.d/random start
index c9187dbbf0643a3df9513e61341e208304790088..58dc4b918dcf32137c849ccf1f28b51e7712a1aa 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: system,v 1.10 2000/02/18 08:35:18 waszi Exp $
+# $Id: system,v 1.11 2000/03/08 16:29:11 misiek Exp $
 
 # Do you want colorized starting scripts ?
 COLOR_INIT=yes
@@ -45,3 +45,12 @@ RUN_LDCONFIG=yes
 
 # Start DevFS daemon to preserve compatibility with old "style" device names
 RUN_DEVFSD=no
+
+# Set to anything other than 'no' to allow hotkey interactive startup...
+PROMPT=yes
+
+# Setting this to something other than 'no' will turn on magic sysrq keys
+MAGIC_SYSRQ=yes
+
+# Setting this to something other than 'no' will turn on stop-a (Sparc only)
+STOP_A=no
This page took 0.054066 seconds and 4 git commands to generate.