Results 1 to 3 of 3

Thread: not logging out-just hitting power button

  1. #1
    Junior Member
    Join Date
    Oct 2004
    Posts
    2

    not logging out-just hitting power button

    Ive been using Knoppix for about a year. I run it live from the cd. When I'm done I just make sure all drives are unmounted and simply hit the power button. Its never seemed to be a problem ...and it takes so long to properly log out-so I continue to do it this way.

    Is this bad for some reason?

  2. #2
    Senior Member registered user
    Join Date
    Feb 2004
    Posts
    949

    Re: not logging out-just hitting power button

    Quote Originally Posted by futfutfut
    Ive been using Knoppix for about a year. I run it live from the cd. When I'm done I just make sure all drives are unmounted and simply hit the power button. Its never seemed to be a problem ...and it takes so long to properly log out-so I continue to do it this way.

    Is this bad for some reason?
    As long as the drives are safely unmounted thats fine.
    Just might build up a bad habit.

  3. #3
    Senior Member registered user
    Join Date
    Mar 2004
    Posts
    1,516
    if you read the shutdown scripts that is esentialy what they do. (extract from my slackware install below).

    # Carry a random seed between reboots.
    echo "Saving random seed from /dev/urandom in /etc/random-seed."
    # Use the pool size from /proc, or 512 bytes:
    if [ -r /proc/sys/kernel/random/poolsize ]; then
    dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(cat /proc/sys/kernel/rando
    m/poolsize) 2> /dev/null
    else
    dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
    fi
    chmod 600 /etc/random-seed

    # Before unmounting file systems write a reboot or halt record to wtmp.
    $command -w

    # Clear /var/lock/subsys.
    if [ -d /var/lock/subsys ]; then
    rm -f /var/lock/subsys/*
    fi

    # A function to deactivate LVM volume groups:
    deactivate_lvm() {
    if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then
    echo "Deactivating LVM volume groups:"
    if cat /proc/sys/kernel/osrelease | cut -f 1,2 -d . | grep -q -w 2.4 2> /dev
    /null ; then
    /sbin/vgchange -an
    else
    /sbin/vgchange -an --ignorelockingfailure
    fi
    sleep 10
    fi
    }
    # Turn off swap, then unmount local file systems.
    echo "Turning off swap."
    swapoff -a
    sync

    echo "Unmounting local file systems."
    # Don't remount UMSDOS root volumes:
    if [ ! "$(mount | head -n 1 | cut -d ' ' -f 5)" = "umsdos" ]; then
    umount -a -t nonfs,noproc,nosysfs
    deactivate_lvm
    umount -a -r -t nonfs,noproc,nosysfs
    echo "Remounting root filesystem read-only."
    mount -n -o remount,ro /
    else
    umount -a -t nonfs,noproc,nosysfs,noumsdos,nosmbfs
    deactivate_lvm
    umount -a -r -t nonfs,noproc,nosysfs,noumsdos,nosmbfs
    fi

    # This never hurts:
    sync

    # sleep 1 fixes problems with some hard drives that don't
    # otherwise finish syncing before reboot or poweroff
    sleep 1

    # This is to ensure all processes have completed on SMP machines:
    wait

    if [ -x /sbin/genpowerd ]; then
    # See if this is a powerfail situation:
    if egrep -q "FAIL|SCRAM" /etc/upsstatus 2> /dev/null ; then
    # Signal UPS to shut off the inverter:
    /sbin/genpowerd -k
    if [ ! $? = 0 ]; then
    echo
    echo "There was an error signaling the UPS."
    echo "Perhaps you need to edit /etc/genpowerd.conf to configure"
    echo "the serial line and UPS type."
    # Wasting 15 seconds of precious power:
    sleep 15
    fi
    fi
    fi# Now halt (poweroff with APM or ACPI enabled kernels) or reboot.
    if [ "$command" = "reboot" ]; then
    echo "Rebooting."
    reboot
    else
    poweroff
    fi
    as you see the things it does are quite well comented, just put # infront of all lines you do not need and it would speed things up (i would not remove them, easyer to repair mistakes if it is just comented out.).
    mine would look as below (the red AND bold#'s)

    # Carry a random seed between reboots.
    echo "Saving random seed from /dev/urandom in /etc/random-seed."
    # Use the pool size from /proc, or 512 bytes:
    if [ -r /proc/sys/kernel/random/poolsize ]; then
    dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(cat /proc/sys/kernel/rando
    m/poolsize) 2> /dev/null
    else
    dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
    fi
    chmod 600 /etc/random-seed

    # Before unmounting file systems write a reboot or halt record to wtmp.
    $command -w

    # Clear /var/lock/subsys.
    if [ -d /var/lock/subsys ]; then
    rm -f /var/lock/subsys/*
    fi

    # A function to deactivate LVM volume groups:
    #deactivate_lvm() {
    # if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then
    # echo "Deactivating LVM volume groups:"
    # if cat /proc/sys/kernel/osrelease | cut -f 1,2 -d . | grep -q -w 2.4 2> /dev
    #/null ; then
    # /sbin/vgchange -an
    # else
    # /sbin/vgchange -an --ignorelockingfailure
    # fi
    # sleep 10
    # fi
    #}
    # Turn off swap, then unmount local file systems.
    echo "Turning off swap."
    swapoff -a
    sync

    echo "Unmounting local file systems."
    # Don't remount UMSDOS root volumes:
    if [ ! "$(mount | head -n 1 | cut -d ' ' -f 5)" = "umsdos" ]; then
    umount -a -t nonfs,noproc,nosysfs
    # deactivate_lvm
    umount -a -r -t nonfs,noproc,nosysfs
    echo "Remounting root filesystem read-only."
    mount -n -o remount,ro /
    else
    umount -a -t nonfs,noproc,nosysfs,noumsdos,nosmbfs
    deactivate_lvm
    umount -a -r -t nonfs,noproc,nosysfs,noumsdos,nosmbfs
    fi

    # This never hurts:
    sync

    # sleep 1 fixes problems with some hard drives that don't
    # otherwise finish syncing before reboot or poweroff
    sleep 1

    # This is to ensure all processes have completed on SMP machines:
    #wait

    #if [ -x /sbin/genpowerd ]; then
    # # See if this is a powerfail situation:
    # if egrep -q "FAIL|SCRAM" /etc/upsstatus 2> /dev/null ; then
    # # Signal UPS to shut off the inverter:
    # /sbin/genpowerd -k
    # if [ ! $? = 0 ]; then
    # echo
    # echo "There was an error signaling the UPS."
    # echo "Perhaps you need to edit /etc/genpowerd.conf to configure"
    # echo "the serial line and UPS type."
    # # Wasting 15 seconds of precious power:
    # sleep 15
    # fi
    # fi
    #fi# Now halt (poweroff with APM or ACPI enabled kernels) or reboot.
    if [ "$command" = "reboot" ]; then
    echo "Rebooting."
    reboot
    else
    poweroff
    fi
    hope this help you some.
    if not let me hear.

Similar Threads

  1. logging out
    By artikid in forum Hdd Install / Debian / Apt
    Replies: 1
    Last Post: 10-07-2004, 03:05 AM
  2. Am I hitting a 3GB memory (user space) limit?
    By vacode in forum Customising & Remastering
    Replies: 0
    Last Post: 06-01-2004, 01:09 AM
  3. Need Help setting up 5 button mouse.
    By robwelch100 in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 03-29-2004, 01:45 AM
  4. Evolution & Button Colors
    By pwoods in forum General Support
    Replies: 0
    Last Post: 02-22-2004, 09:58 PM
  5. Mouse Left-button pb
    By joeguitar99 in forum General Support
    Replies: 1
    Last Post: 02-20-2004, 09:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


(New) AMD Ryzen 7 5700X 8 Core 16 Thread AM4 Unlocked 3.4 GHz CPU OEM Tray picture

(New) AMD Ryzen 7 5700X 8 Core 16 Thread AM4 Unlocked 3.4 GHz CPU OEM Tray

$174.99



OPNsense Firewall 8-Core Atom C3758 4GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI VPN picture

OPNsense Firewall 8-Core Atom C3758 4GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI VPN

$95.00



AMD Ryzen 7 PRO 8700GE 8-Core/16-Thread Up to 5.1GHz AM5 (FL1) picture

AMD Ryzen 7 PRO 8700GE 8-Core/16-Thread Up to 5.1GHz AM5 (FL1)

$175.00



Apple Mac Pro (A1186,

Apple Mac Pro (A1186, "8Core" 2007)Xeon X5365-4GB Ram 1TB HDD OS XLeopard NVIDIA

$274.99



Lenovo ThinkCentre M720Q Core i5-8500T 2.10GHz 8GB 128GB SDD W11 Mini PC (Z3675) picture

Lenovo ThinkCentre M720Q Core i5-8500T 2.10GHz 8GB 128GB SDD W11 Mini PC (Z3675)

$125.96



AMD Ryzen 7 5800X3D 8-core, 16-Thread Desktop Processor picture

AMD Ryzen 7 5800X3D 8-core, 16-Thread Desktop Processor

$300.00



AMD Ryzen 7 9850X3D 8-Core 16-Thread 5.6GHz 120W AM5 CPU 100-100001973WOF picture

AMD Ryzen 7 9850X3D 8-Core 16-Thread 5.6GHz 120W AM5 CPU 100-100001973WOF

$435.99



HP - OmniBook 3 - 14

HP - OmniBook 3 - 14" 2K OLED Laptop - Snapdragon X (8-Core CPU) - 8GB Memory...

$399.99



Clear Touch Interactive Module CTI PCMOD PC55 ST i5 6core,8GB DDR4,256GB SSD NEW picture

Clear Touch Interactive Module CTI PCMOD PC55 ST i5 6core,8GB DDR4,256GB SSD NEW

$225.00



LG Gram 13.3

LG Gram 13.3" Laptop - Intel Core i5-8250U, 8GB RAM, 256GB SSD (13Z980-U.AAW5U1)

$300.00