Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[PROBLEM] Auto dir creation on start up?
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Problem: Auto dir creation on start up?
7th Mar, 2016, 06:03 PM
Post: #1
mborkp Offline
Registered
Posts: 14
Joined: Mar 2016
Reputation: 0
Auto dir creation on start up?
Hi,
for my openvpn to run I need below commands to be executed on start-up:

mkdir /dev/net
mknod /dev/net/tun c 10 200
chmod 0666 /dev/net/tun

Can I set that up in rc.local and how please?

Thanks
Find all posts by this user
Quote this message in a reply
7th Mar, 2016, 11:43 PM
Post: #2
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: Auto dir creation on start up?
Yes you can

Just add the three lines to the end of /etc/rc.local

Code:
sudo nano /etc/rc.local
Find all posts by this user
Quote this message in a reply
8th Mar, 2016, 06:39 AM
Post: #3
mborkp Offline
Registered
Posts: 14
Joined: Mar 2016
Reputation: 0
RE: Auto dir creation on start up?
So the file should look like this?

sudo nano /etc/rc.local mkdir /dev/net
sudo nano /etc/rc.local mknod /dev/net/tun c 10 200
sudo nano /etc/rc.local chmod 0666 /dev/net/tun
exit 0

Thanks.

EDIT: ahhhh nano is an editor, got it, thanks Smile

(7th Mar, 2016 11:43 PM)Nachteule Wrote:  Yes you can

Just add the three lines to the end of /etc/rc.local

Code:
sudo nano /etc/rc.local

Hi,
Edited file looks like this now:
/etc/rc.local mkdir /dev/net
/etc/rc.local mknod /dev/net/tun c 10 200
/etc/rc.local chmod 0666 /dev/net/tun
exit 0

Strange, I can't see the file in /etc in terminal but, the sudo nano /etc/rc.local edits it... im logged as root. Is there any reason for that?
Thank you.

EDIT: damn, it is too early here, of course it looks like this:
mkdir /dev/net
mknod /dev/net/tun c 10 200
chmod 0666 /dev/net/tun
exit 0:
Find all posts by this user
Quote this message in a reply
9th Mar, 2016, 12:06 AM
Post: #4
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: Auto dir creation on start up?
Look to my post #9
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 25th May, 2025, 09:20 PM Powered By MyBB, © 2002-2025 MyBB Group.