红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Debian

!!!!!!!!救急,求好心人把/etc/rc2.d下的S20gdm3文件发给我,误删了

发布时间:2011-10-16 11:51:30来源:红联作者:BMVR
不小心一个rm误删了,毁阿,拜托了~~
把代码贴上来也行
文章评论

共有 1 条评论

  1. okzokz123 于 2011-10-16 21:50:55发表:

    自己虚拟机装个就提出来了噻 那个是/etc/init.d/gdm3的链接自己做个就是了嘛 gdm3的内容下面贴出来
    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides: gdm3
    # Should-Start: console-screen dbus network-manager
    # Required-Start: $local_fs $remote_fs
    # Required-Stop: $local_fs $remote_fs
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: GNOME Display Manager
    # Description: Debian init script for the GNOME Display Manager
    ### END INIT INFO
    #
    # Author: Ryan Murray <rmurray@debian.org>
    #
    set -e

    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    DAEMON=/usr/sbin/gdm3

    test -x $DAEMON || exit 0

    if [ -r /etc/default/locale ]; then
    . /etc/default/locale
    export LANG LANGUAGE
    fi

    . /lib/lsb/init-functions

    # To start gdm even if it is not the default display manager, change
    # HEED_DEFAULT_DISPLAY_MANAGER to "false."
    HEED_DEFAULT_DISPLAY_MANAGER=true
    DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager

    gen_config() {
    if [ -d /var/lib/gdm3/.gconf.mandatory ]; then
    update-gconf-defaults \
    --source=/usr/share/gdm/greeter-config \
    --destination=/var/lib/gdm3/.gconf.mandatory \
    --no-signal \
    --only-if-changed
    fi
    if [ -f /var/lib/gdm3/.gconf.mandatory/%gconf-tree.xml ]; then
    chown Debian-gdm:Debian-gdm /var/lib/gdm3/.gconf.mandatory/%gconf-tree.xml
    fi
    }

    case "$1" in
    start)
    CONFIGURED_DAEMON=$(basename "$(cat $DEFAULT_DISPLAY_MANAGER_FILE 2> /dev/null)")
    if grep -wqs text /proc/cmdline; then
    log_warning_msg "Not starting GNOME Display Manager; found 'text' in kernel commandline."
    elif [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ] && \
    [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] && \
    [ "$CONFIGURED_DAEMON" != gdm3 ] ; then
    log_action_msg "Not starting GNOME Display Manager; it is not the default display manager"
    else
    log_daemon_msg "Starting GNOME Display Manager" "gdm3"
    gen_config
    start-stop-daemon --start --quiet --pidfile /var/run/gdm3.pid \
    --background --exec $DAEMON || log_end_msg 1
    log_end_msg 0
    fi
    ;;
    stop)
    log_daemon_msg "Stopping GNOME Display Manager" "gdm3"
    set +e
    start-stop-daemon --stop --quiet --pidfile /var/run/gdm3.pid \
    --name gdm3 --retry 5
    set -e
    log_end_msg $?
    ;;
    reload)
    log_daemon_msg "Scheduling reload of GNOME Display Manager configuration" "gdm3"
    set +e
    gen_config
    start-stop-daemon --stop --signal USR1 --quiet --pidfile \
    /var/run/gdm3.pid --name gdm3
    start-stop-daemon --stop --signal HUP --quiet --name gconfd-2 \
    --user Debian-gdm --oknodo
    set -e
    log_end_msg $?
    ;;
    status)
    status_of_proc -p "$PIDFILE" "$DAEMON" gdm3 && exit 0 || exit $?
    ;;
    restart|force-reload)
    $0 stop
    $0 start
    ;;
    *)
    echo "Usage: /etc/init.d/gdm3 {start|stop|restart|reload|force-reload|status}"
    exit 1
    ;;
    esac

    exit 0