Changeset 2702

Show
Ignore:
Timestamp:
03/11/08 11:07:26 (9 months ago)
Author:
hollow
Message:

fix openrc startup; only fix inittab in plain initstyle

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/distrib/gentoo/initpost

    r2699 r2702  
    8484        echo "!!! packages into the guest environment." 
    8585        echo "!!!" 
     86else 
     87        # fix gettys in inittab 
     88        if $_CHROOT_SH testfile /etc/inittab; then 
     89                echo ">>> Fixing inittab ... " 
     90                chrootsed /etc/inittab \ 
     91                        -e 's/\(^[^#].*getty.*$\)/#\1/' 
     92        fi 
    8693fi 
    8794 
    88  
    8995# unneeded runlevel scripts 
    90 echo ">>> Fixing default runlevel scripts ... " 
    9196if test $have_openrc -ne 1; then 
     97        echo ">>> Fixing default runlevel scripts ... " 
    9298        $_CHROOT_SH rm /etc/runlevels/boot/{clock,consolefont,keymaps,modules,net.lo} 2>/dev/null || : 
    9399        $_CHROOT_SH rm /etc/runlevels/default/{hdparm,netmount} 2>/dev/null || : 
    94100fi 
    95  
    96101 
    97102# setting hostname 
     
    102107fi 
    103108 
    104  
    105109# fix syslog-ng.conf 
    106110if $_CHROOT_SH testfile /etc/syslog-ng/syslog-ng.conf; then 
     
    110114                -e 's:\(.*console_all.*\):#\1:g' 
    111115fi 
    112  
    113  
    114 # fix gettys in inittab 
    115 if $_CHROOT_SH testfile /etc/inittab; then 
    116         echo ">>> Fixing inittab ... " 
    117         chrootsed /etc/inittab \ 
    118                 -e 's/\(^[^#].*getty.*$\)/#\1/' 
    119 fi 
    120  
    121116 
    122117# fix fstab for checkfs/localmount in baselayout-2 
  • trunk/scripts/vserver.functions

    r2692 r2702  
    318318            RC_PATH=/usr/sbin:/usr/bin:/sbin:/bin 
    319319 
    320             INITCMD_START=( env TERM=$TERM /lib/rcscripts/sh/init-vserver.sh "$RUNLEVEL_START" ) 
     320            if test -x "$vdir/vdir/lib/rcscripts/sh/init-vserver.sh"; then 
     321                RC_WRAP=/lib/rcscripts/sh/init-vserver.sh 
     322            elif test -x "$vdir/vdir/lib/rc/sh/init-vserver.sh"; then 
     323                RC_WRAP=/lib/rc/sh/init-vserver.sh 
     324            else 
     325                panic "init-vserver.sh not found; aborting" 
     326            fi 
     327 
     328            INITCMD_START=( env TERM=$TERM $RC_WRAP "$RUNLEVEL_START" ) 
    321329            INITCMD_STOP=( env -i PATH=$RC_PATH TERM=$TERM RUNLEVEL=0 /sbin/rc shutdown ) 
    322330            INITCMD_PREPARE=( $_FAKE_RUNLEVEL 3 /var/run/utmp )