-
Notifications
You must be signed in to change notification settings - Fork 3
/
rc.local
54 lines (44 loc) · 1.11 KB
/
rc.local
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
exec 2> /tmp/rc.local.log
exec 1>&2
set -x
#!/bin/bash
FLAG="/var/log/firstboot.log"
if [ ! -f $FLAG ]; then
#Put here your initialization sentences
echo "This is the first boot"
systemctl stop dhcpcd
systemctl disable dhcpcd
apt update
apt install -y network-manager
apt clean
# systemctl enable NetworkManager
# systemctl start NetworkManager
systemctl enable ras-portal.service
systemctl start ras-portal.service
systemctl enable ras-launcher.service
systemctl start ras-launcher.service
#the next line creates an empty file so it won't run the next boot
touch $FLAG
else
echo "Do nothing"
fi
# Uncomment to disable hdmi display on RPi
# /usr/bin/tvservice -o
exit 0