From d7fe8d6ea477b49504ddd242ac49d9b6a3f53d06 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 1 Sep 2006 21:48:48 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11081 --- checkin_notes | 7 +++++++ sea/insecure.sh | 4 ++-- sea/secure.sh | 12 ++++++------ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/checkin_notes b/checkin_notes index f6d64632cd..c65cdcc118 100755 --- a/checkin_notes +++ b/checkin_notes @@ -9715,3 +9715,10 @@ David 1 Sep 2006 ViewMessages.cpp sg_DlgMessages.cpp sg_ProjectsComponents.cpp + +David 1 Sep 2006 + - make scripts work with sh + + sea/ + insecure.sh + secure.sh diff --git a/sea/insecure.sh b/sea/insecure.sh index 6265e20d97..7696083085 100755 --- a/sea/insecure.sh +++ b/sea/insecure.sh @@ -27,14 +27,14 @@ # # Execute this as root in the BOINC directory -function remove_boinc_users() { +remove_boinc_users() { userdel boinc_master userdel boinc_projects groupdel boinc_master groupdel boinc_projects } -function check_login() { +check_login() { if [ `whoami` != 'root' ] then echo 'This script must be run as root' diff --git a/sea/secure.sh b/sea/secure.sh index 32cc8ddb12..f8121b4eee 100755 --- a/sea/secure.sh +++ b/sea/secure.sh @@ -31,14 +31,14 @@ # e.g.: # usermod -G boinc_master,boinc_projects -a mary -function make_boinc_users() { +make_boinc_users() { groupadd boinc_master groupadd boinc_projects useradd boinc_master -g boinc_master useradd boinc_projects -g boinc_projects } -function check_login() { +check_login() { if [ `whoami` != 'root' ] then echo 'This script must be run as root' @@ -48,21 +48,21 @@ function check_login() { # set_perm path user group perm # set a file or directory to the given ownership/permissions -function set_perm() { +set_perm() { chown $2:$3 "$1" chmod $4 "$1" } # same, but apply to all subdirs and files # -function set_perm_recursive() { +set_perm_recursive() { chown -R $2:$3 "$1" chmod -R $4 "$1" } # same, but apply to items in the given dir # -function set_perm_dir() { +set_perm_dir() { for file in $(ls "$1") do path="$1/${file}" @@ -70,7 +70,7 @@ function set_perm_dir() { done } -function update_nested_dirs() { +update_nested_dirs() { chmod u+x,g+x,o+x "${1}" for file in $(ls "$1")