Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !5935

Merged
Created 11 years ago by Administrator@rootOwner

Changed sudo by su -c

  • Overview 12
  • Commits 1
  • Changes 1

Created by: nmoura

The sudo command needs a tty to run. If you put this file on a CentOS 6, for example, it will not run in the host startup process. Instead, the 'su -c' runs the command apart if it has or not a tty.

I tested this change in a fresh install of gitlab on a CentOS 6.5 with successful.

Loading
Loading

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jvanbaarsen

    Will ubuntu be able to handle su -c?

    By Administrator on 2013-12-27T12:19:15 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: nmoura

    I'll test 'su -c' in the startup of Ubuntu Server, and I'll let you know. Please, wait my answer.

    By Administrator on 2013-12-27T19:35:11 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: nmoura

    Tested on Ubuntu Server 12.04.3 LTS with success:

    /etc/rc.local contents: (...) app_user=nmoura if [ "$USER" != "$app_user" ]; then eval su - "$app_user" -c $(echo ")$0 "$0"$(echo "); exit; fi

    touch /tmp/success exit 0

    ls -l /tmp/success after reboot: -rw-rw-r-- 1 nmoura nmoura 0 Dec 27 17:49 /tmp/success

    By Administrator on 2013-12-27T19:50:13 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: nickbroon

    This also works well for my RHEL install.

    By Administrator on 2014-01-06T13:58:35 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jvanbaarsen

    @randx Seems good to merge?

    By Administrator on 2014-01-06T14:02:55 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: nickbroon

    Would be nice to see this included in the next release. 👍

    By Administrator on 2014-01-16T13:03:53 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jvanbaarsen

    @jacobvosmaer Can you take a look?

    By Administrator on 2014-02-10T18:27:44 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jacobvosmaer

    @rovanion what do you think about this change?

    By Administrator on 2014-02-11T08:24:25 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: Rovanion

    It seems to be passing exit status to the child process and messages seems to be printed as expected so it seems like a good patch if it gets the script working on CentOS.

    By Administrator on 2014-02-11T12:22:12 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jacobvosmaer

    This also seems to work on Ubuntu.

    By Administrator on 2014-02-20T11:48:09 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jvanbaarsen

    @randx Looks good to merge

    By Administrator on 2014-03-24T20:05:16 (imported from GitLab project)

  • Administrator
    Administrator @root · 11 years ago
    Owner

    Created by: jacobvosmaer

    Thanks everybody!

    By Administrator on 2014-03-25T14:07:03 (imported from GitLab project)

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
0 Assignees
Assign to
0 Reviewers
Request review from
Milestone
No milestone
None
None
Time tracking
1
Labels
Ready for Merge
Assign labels
  • No matching results
  • Manage project labels
Lock merge request
Unlocked
participants
Reference:
Source branch: github/fork/nmoura/patch-1

    0 pending comments