Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1869062e
authored
Mar 04, 2013
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
context: redhat support added
parent
9dbe3757
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
2 deletions
+42
-2
miscellaneous/context/ubuntu/etc/context/init.d/00hostname
+7
-1
miscellaneous/context/ubuntu/etc/context/init.d/00networking
+25
-0
miscellaneous/context/ubuntu/etc/context/init.d/04booturl
+1
-1
miscellaneous/context/ubuntu/etc/context/init.sh
+9
-0
No files found.
miscellaneous/context/ubuntu/etc/context/init.d/00hostname
View file @
1869062e
...
...
@@ -3,6 +3,12 @@
echo
"En vagyok a
$0
!"
hostname
"
$HOSTNAME
"
echo
"
$HOSTNAME
"
>
/etc/hostname
if
[
"
$DISTRO
"
==
"ubuntu"
]
;
then
echo
"
$HOSTNAME
"
>
/etc/hostname
fi
if
[
"
$DISTRO
"
==
"redhat"
]
;
then
echo
-e
-n
"NETWORKING=yes
\n
HOSTNAME=
$HOSTNAME
\n
"
>
/etc/sysconfig/network
fi
sed
"s/
\(
127
\.
0
\.
1
\.
1
\)
.*/
\1\t
$HOSTNAME
/"
-i
/etc/hosts
miscellaneous/context/ubuntu/etc/context/init.d/00networking
View file @
1869062e
...
...
@@ -13,6 +13,7 @@ echo ok "$ipv4 $ipv6 $gw4 $gw6"
/
etc/init.d/network-manager stop
ifdown eth0
||
ifconfig eth0
0
down
if
[
"
$DISTRO
"
==
"ubuntu"
]
;
then
cat
>
/
etc/network/interfaces
<<
EOF
auto lo
iface lo inet loopback
...
...
@@ -30,4 +31,28 @@ EOF
ifup eth0
fi
if
[
"
$DISTRO
"
==
"redhat"
]
;
then
cat
>
/
etc/sysconfig/network-scripts/ifcfg-eth0
<<
EOF
DEVICE="eth0"
BOOTPROTO="none"
IPV6INIT="yes"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
DNS1="152.66.243.60"
PEERDNS="yes"
IPADDR="
$ipv4
"
NETMASK="255.255.0.0"
GATEWAY=
$gw4
IPV6ADDR="
$ipv6
/80"
IPV6_DEFAULTGW="
$gw6
"
EOF
ifup eth0
fi
miscellaneous/context/ubuntu/etc/context/init.d/04booturl
View file @
1869062e
...
...
@@ -2,7 +2,7 @@
echo
"En vagyok a
$0
!"
(
while
!
wget
-T
2
-t
1
-q
-O
/dev/null
"
$BOOTURL
"
;
do
sleep 5
;
done
)
&
(
while
!
wget
-T
2
-t
1
-q
-
-no-check-certificate
-
O
/dev/null
"
$BOOTURL
"
;
do
sleep 5
;
done
)
&
disown
$!
miscellaneous/context/ubuntu/etc/context/init.sh
View file @
1869062e
...
...
@@ -4,6 +4,15 @@ export BASEDIR=$(dirname $0)
export
USER
=
"cloud"
export
HOME
=
$(
awk
-F
:
-v
u
=
$USER
'$1==u{print $6}'
/etc/passwd
)
if
[
-f
/etc/lsb-release
]
;
then
export
DISTRO
=
ubuntu
fi
if
[
-f
/etc/redhat-release
]
;
then
export
DISTRO
=
redhat
fi
echo
$DISTRO
mkdir
-p
"
$BASEDIR
/mnt"
cd
"
$BASEDIR
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment