Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
11645e31
authored
Jan 29, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ubuntu context folder
parent
3686a672
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
0 deletions
+77
-0
miscellaneous/context/ubuntu/etc/context/cleanup.sh
+5
-0
miscellaneous/context/ubuntu/etc/context/init.d/00hostname
+8
-0
miscellaneous/context/ubuntu/etc/context/init.d/00sshd
+8
-0
miscellaneous/context/ubuntu/etc/context/init.d/01passwd
+6
-0
miscellaneous/context/ubuntu/etc/context/init.d/02sshfs
+11
-0
miscellaneous/context/ubuntu/etc/context/init.d/03profile
+6
-0
miscellaneous/context/ubuntu/etc/context/init.d/04booturl
+7
-0
miscellaneous/context/ubuntu/etc/context/init.sh
+26
-0
No files found.
miscellaneous/context/ubuntu/etc/context/cleanup.sh
0 → 100755
View file @
11645e31
#!/bin/bash
#rm -f /etc/ssh/ssh_host_*
stop rsyslog
rm
-fr
/home/cloud/.bash_history /root/.bash_history /var/log/
*
miscellaneous/context/ubuntu/etc/context/init.d/00hostname
0 → 100755
View file @
11645e31
#!/bin/bash
echo
"En vagyok a
$0
!"
hostname
"
$HOSTNAME
"
echo
"
$HOSTNAME
"
>
/etc/hostname
sed
"s/
\(
127
\.
0
\.
1
\.
1
\)
.*/
\1\t
$HOSTNAME
/"
-i
/etc/hosts
miscellaneous/context/ubuntu/etc/context/init.d/00sshd
0 → 100755
View file @
11645e31
#!/bin/bash
echo
"En vagyok a
$0
!"
/etc/init.d/ssh stop
dpkg-reconfigure openssh-server
/etc/init.d/ssh start
miscellaneous/context/ubuntu/etc/context/init.d/01passwd
0 → 100755
View file @
11645e31
#!/bin/bash
echo
"En vagyok a
$0
!"
echo
"
$USER
:
$USERPW
"
| chpasswd
miscellaneous/context/ubuntu/etc/context/init.d/02sshfs
0 → 100755
View file @
11645e31
#!/bin/bash
echo
"En vagyok a
$0
!"
mkdir
-p
"
$HOME
/.ssh"
echo
"
$SSHPRIV
"
>
$HOME
/.ssh/id_rsa
chmod 600
"
$HOME
/.ssh/id_rsa"
mkdir
"
$HOME
/sshfs"
chown
"
$USER
:
$USER
"
-R
"
$HOME
"
sed
-i
"s/^
\(
<
\/
pam_mount>.*
\)
/<volume user=
\"
$USER
\"
fstype=
\"
fuse
\"
path=
\"
sshfs#
${
NEPTUN
}
@
${
SERVER
}
:home
\"
mountpoint=
\"
~
\/
sshfs
\"
options=
\"
nonempty,reconnect,StrictHostKeyChecking=no
\"
\/
>
\n\1
/"
/etc/security/pam_mount.conf.xml
miscellaneous/context/ubuntu/etc/context/init.d/03profile
0 → 100755
View file @
11645e31
#!/bin/bash
echo
"En vagyok a
$0
!"
echo
"export NEPTUN=
$NEPTUN
"
>>
$HOME
/.profile
miscellaneous/context/ubuntu/etc/context/init.d/04booturl
0 → 100755
View file @
11645e31
#!/bin/bash
echo
"En vagyok a
$0
!"
wget
-q
-O
/dev/null
"
$BOOTURL
"
miscellaneous/context/ubuntu/etc/context/init.sh
0 → 100755
View file @
11645e31
#!/bin/bash
export
BASEDIR
=
$(
dirname
$0
)
export
USER
=
"cloud"
export
HOME
=
$(
awk
-F
:
-v
u
=
$USER
'$1==u{print $6}'
/etc/passwd
)
cd
"
$BASEDIR
"
mount
-t
iso9660 /dev/cdrom1
"
$BASEDIR
/mnt"
2> /dev/null
if
[
$?
-eq
0
-a
-f
"
$BASEDIR
/firstrun"
-a
-f
"
$BASEDIR
/mnt/context.sh"
]
;
then
.
"
$BASEDIR
/mnt/context.sh"
# hogy tudom kiexportalni ennel szebben ezeket a valtozokat?
eval
`
grep
-o
'^[a-zA-Z0-9]\+='
"
$BASEDIR
/mnt/context.sh"
|
while
read
x
;
do
echo export
${
x
%=
}
;
done
`
run-parts
"
$BASEDIR
/init.d"
rm
"
$BASEDIR
/firstrun"
else
echo
"mar korabban lefutott!"
fi
umount /dev/cdrom1 2>/dev/null
eject /dev/cdrom1
exit
0
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