Tag Info

New answers tagged

0

I resolved this issue in Ubuntu 14.10 by replacing 'ehci_hcd' to ehci-pci' in 11_usb_s3. I have ehci-pci folder instead of ehci_hcd. #!/bin/sh #unbind usb device before enter S3 #bind usb device after resume from S3 case "${1}" in suspend | hibernate) for i in `lspci -vv | grep "USB controller" | awk '/EHCI/ {print $1}'` ...


0

Looks like the same problem to this post. Can you boot into that Windows partition at all? If you can, boot into Windows and then just make sure you properly shut it down and then try again. If you can't boot into that Windows partition it looks like ntfsfix would be your next best option. To use ntfsfix you would have to install it and then run sudo ...


1

Simpler than adding a script to init.d is to write an Upstart configuration. I'd favour this above all. Create a .conf file in /etc/init (say /etc/init/sleep-on-suspend.conf, containing: description "Automatic suspend" start on runlevel [2345] stop on runlevel [016] exec /path/to/script This will be automatically started on reboot. You could even ...


1

This script will run on startup. If you really mean this then you are already talking root privileges. What does the rest of your script look like? We can't really judge the security or lack of same from isolated commands. One alternative would be to run it, say, every 5 minutes out of root's crontab. If you are scared of security consequences, you ...


2

Run sudo crontab -e -u root and append the line @reboot /path/to/script to the bottom of the file, then the root user will automagically run your script as root on login. And a friendly reminder to make sure nobody apart from you and root can access the script, otherwise people could run any command as root.


0

Another alternative is using sudo -S (which is not safe either). -S switch of sudo will read the password from STDIN. So, you can use it like: echo 'password' | sudo -S <command>



Top 50 recent answers are included