提交 68f77104 编写于 作者: K Kohsuke Kawaguchi

leaving the marker in place. could be useful down the road

上级 ca22c456
...@@ -24,25 +24,26 @@ case "$1" in ...@@ -24,25 +24,26 @@ case "$1" in
# Create jenkins user if it doesn't exist. # Create jenkins user if it doesn't exist.
# sometimes tools that users want Jenkins to run need a shell, # sometimes tools that users want Jenkins to run need a shell,
# so use /bin/bash. See JENKINS-4830 # so use /bin/bash. See JENKINS-4830
if ! id jenkins > /dev/null 2>&1 ; then if ! id jenkins > /dev/null 2>&1 ; then
adduser --system --home /var/lib/jenkins --no-create-home \ adduser --system --home /var/lib/jenkins --no-create-home \
--ingroup nogroup --disabled-password --shell /bin/bash \ --ingroup nogroup --disabled-password --shell /bin/bash \
jenkins jenkins
fi fi
# If we have an old hudson install, rename it to jenkins # If we have an old hudson install, rename it to jenkins
if test -d /var/lib/hudson; then if test -d /var/lib/hudson; then
# We need to ensure that the .??* wildcard matches something # leave a marker to indicate this came from Hudson.
touch /var/lib/hudson/.moving-hudson # could be useful down the road
mv -f /var/lib/hudson/* /var/lib/hudson/.??* /var/lib/jenkins # This also ensures that the .??* wildcard matches something
rmdir /var/lib/hudson touch /var/lib/hudson/.from-hudson
rm /var/lib/jenkins/.moving-hudson mv -f /var/lib/hudson/* /var/lib/hudson/.??* /var/lib/jenkins
find /var/lib/jenkins -user hudson -exec chown jenkins {} + || true rmdir /var/lib/hudson
fi find /var/lib/jenkins -user hudson -exec chown jenkins {} + || true
if test -d /var/run/hudson; then fi
mv -f /var/run/hudson/* /var/run/jenkins if test -d /var/run/hudson; then
rmdir /var/run/hudson mv -f /var/run/hudson/* /var/run/jenkins
fi rmdir /var/run/hudson
fi
# Fix permissions on runtime directories/files. # Fix permissions on runtime directories/files.
# change group/owner to jenkins:adm - exclude jobs directory. See HUDSON-4047 # change group/owner to jenkins:adm - exclude jobs directory. See HUDSON-4047
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册