Register
It is currently Mon Apr 23, 2018 6:50 pm

Rhel 6.7 rc.local script issues


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Tue Mar 22, 2016 11:34 am   

Joined: Tue Mar 22, 2016 11:07 am
Posts: 1
Hello,

I'm having a basic issue with the /etc/rc.local script. I recently migrated to a Lenovo T450, and found that I really dislike the large touchpad as it interferes with my typing. There's a command that I can run to disable the thinkpad: input set-prop `xinput | grep "Synaptics" | awk -F\= '{print $2}'| awk '{print $1}' ` "Device Enabled" 0
This command works fine, but doesn't seem to execute (at least properly) when I throw it in the rc.local init script. Here is the init script in its entirety:


#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

#Disables touchpad
xinput set-prop `xinput | grep "Synaptics" | awk -F\= '{print $2}'| awk '{print $1}' ` "Device Enabled" 0

touch /var/lock/subsys/local



The file is owned by root, and permissions are set at the default 755. I can't think of what would be causing the script to fail, so any help would be greatly appreciated!

Edit: I don't know why it creates the /var/lock/subsys/local file, but that command was there and I did not add it.


Top
 Profile  
 PostPosted: Tue Mar 22, 2016 4:41 pm   

Joined: Mon Oct 20, 2014 9:53 am
Posts: 574
There is a skeleton file you should use writing init scripts.
Don't know where it is at your Linux.
Have a look in /etc/init or places alike.

There are some specs for init scripts according to LSB named within the skeleton file.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP