-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update cob-stud installation #85
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
==== Install Ubuntu 14.04 LTS | ||
---- | ||
username: ipa | ||
username: stud-admin | ||
systemname: cob-stud-<client number> | ||
password: **** | ||
---- | ||
|
@@ -35,9 +35,12 @@ $ sudo sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/g' /etc/ss | |
|
||
==== Gain root rights for admin user's | ||
---- | ||
$ sudo adduser --home /home-local/Admin Admin --force-badname | ||
$ sudo adduser Admin sudo | ||
$ sudo nano /etc/sudoers | ||
##add to the list### | ||
stud-admin ALL=(ALL) NOPASSWD: ALL | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this mean we can delete stud-admin? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, stud-admin has still sudo rights, but it is a pool account and not a local one. This user is also the administrator for cob-kitchen-svr |
||
Admin ALL=(ALL) NOPASSWD: ALL | ||
---- | ||
|
||
|
||
|
@@ -138,3 +141,13 @@ $ rosdep update | |
$ sudo apt-get install python-rosinstall python-rosdep | ||
$ sudo apt-get install python-setuptools ogre-tools | ||
---- | ||
|
||
=== Extra tools | ||
|
||
---- | ||
$ sudo cp ~/setup/cob-stud-clients/upstart_lightdm /etc/init.d/. | ||
$ sudo update-rc.d upstart_lightdm defaults | ||
$ sudo cp ~/setup/cob-stud-clients/restart_lightdm /usr/sbin/. | ||
$ sudo cp ~/setup/cob-stud-clients/restart_lock /etc/init.d/. | ||
$ sudo update-rc.d restart_lock defaults | ||
---- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sudo mount -a | ||
sudo service lightdm restart& |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
export DISPLAY=:0 && dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" | \ | ||
( | ||
while true; do | ||
read X | ||
if echo $X | grep "boolean true" &> /dev/null; then | ||
echo SCREEN_LOCKED; | ||
elif echo $X | grep "boolean false" &> /dev/null; then | ||
sudo mount -a; | ||
sleep 1; | ||
fi | ||
done | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this well tested? can this be used for the robot pcs too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tested and adapted for the robots! ipa320/setup_cob4#51 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please consider updated scripts for robot as proposed in ipa320/setup_cob4#84 is it possible to make the |
||
|
||
sudo apt list --installed > /tmp/package_list | ||
perl -pi -e 's{ / .*? ]}{}x' /tmp/package_list | ||
sed -i 's/Listing...//' /tmp/package_list | ||
sed -i ':a;N;$!ba;s/\n/ /g' /tmp/package_list | ||
tr '\n' ' ' < /tmp/package_list | sed -i '$s/ $/\n/' /tmp/package_list | ||
packages=$(cat /tmp/package_list) | ||
|
||
pcs=" | ||
cob-stud-1 | ||
cob-stud-2 | ||
cob-stud-3 | ||
cob-stud-4 | ||
cob-stud-5 | ||
cob-stud-6 | ||
cob-stud-7" | ||
|
||
for i in $pcs; do | ||
echo "-------------------------------------------" | ||
echo "Installing packages on $i" | ||
echo "-------------------------------------------" | ||
echo "" | ||
ssh $i "sudo apt-get update" | ||
ssh $i "sudo apt-get install $packages -y" | ||
ret=${PIPESTATUS[0]} | ||
if [ $ret != 0 ] ; then | ||
echo -t "apt-get return an error (error code: $ret), aborting..." | ||
exit 1 | ||
fi | ||
echo "" | ||
done | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
while ! ping -c 1 -W 1 10.0.1.2; do | ||
echo "Waiting for 10.0.1.2 - network interface might be down..." | ||
sleep 1 | ||
done | ||
sudo mount -a | ||
sudo service lightdm restart |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sudo mount -a | ||
sudo service lightdm restart& |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
export DISPLAY=:0 && dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" | \ | ||
( | ||
while true; do | ||
read X | ||
if echo $X | grep "boolean true" &> /dev/null; then | ||
echo SCREEN_LOCKED; | ||
elif echo $X | grep "boolean false" &> /dev/null; then | ||
sudo mount -a; | ||
sleep 1; | ||
fi | ||
done | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
while ! ping -c 1 -W 1 10.0.1.2; do | ||
echo "Waiting for 10.0.1.2 - network interface might be down..." | ||
sleep 1 | ||
done | ||
sudo mount -a | ||
sudo service lightdm restart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you use
Admin
with capitalA
? we always use lower case names for accountsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes with a capital A, admin is already a group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about
stud-admin
user, then?