Monday, February 4, 2013

Script I used for suspending wireless - bluetooth and wifi - on Sony Vaio VPCS116FA

Here is a script that I used for disabling / enabling wireless on my laptop during suspend/wakeup

[root]# cat > /etc/pm/sleep.d/wireless <<EOF

#!/bin/bash

. /usr/lib/pm-utils/functions

case "$1" in
    hibernate|suspend)
                rfkill block all
                ;;
    thaw|resume)
                rfkill unblock all
                ;;
    *)
                ;;
esac

exit

EOF
[root]# chmod 755 /etc/pm/sleep.d/wireless

4 comments:

  1. I have been searching for puppet module for installing and configuring pgpool and you have just solved my problem by providing me the required program.

    ReplyDelete
  2. For anyone working with Linux power management and device control, understanding scripts like this can be valuable for system administration and automation. It also provides useful ideas for students exploring Networking Projects for Final Year, where power management, wireless communication, and device interaction are important practical concepts. The step-by-step configuration makes the implementation straightforward and easy to customize.

    ReplyDelete
  3. Another useful aspect is the use of rfkill, which offers a simple interface for controlling wireless hardware without requiring complex configurations. Exploring such Linux utilities can strengthen knowledge of operating systems and network management, making them relevant to Network Security Projects for Final Year, where secure handling of wireless interfaces and system-level scripting are frequently incorporated into real-world implementations.

    ReplyDelete