Skip to content
Snippets Groups Projects
Commit cdd5df48 authored by Denis Pynkin's avatar Denis Pynkin
Browse files

Remove bashisms from scripts


Scripts must be able to run in chrooted environment without
the `bash`. Remove call of internal `shopt` command and fix shebang.

Fixes T4475

Signed-off-by: default avatarDenis Pynkin <denis.pynkin@collabora.com>

Differential Revision: https://phabricator.apertis.org/D7426
parent dfe1d506
Branches T4475
No related tags found
No related merge requests found
#!/bin/bash
#!/bin/sh
set -e
shopt -s dotglob > /dev/null 2>&1
# Hackish: Add user XDG metadata BUG: #1157
echo "I: Adding XDG user metadata."
......@@ -10,4 +9,3 @@ mkdir -p /etc/skel/.local/{bin,etc,include,lib,libexec,share}
mkdir -p /root/{.config,.cache,.dbus}
mkdir -p /root/.local/{bin,etc,include,lib,libexec,share}
shopt -u
#!/bin/bash
#!/bin/sh
set -e
......
#!/bin/bash
#!/bin/sh
set -e
shopt -s dotglob
distro=$1
rel=$2
......@@ -9,5 +8,3 @@ timestamp=$3
vendor=$4
echo "${distro} ${rel} ${timestamp} ${vendor}" > /etc/image_version
shopt -u
#!/bin/bash
#!/bin/sh
set -e
shopt -s dotglob
echo "I: create sysroot directory"
install -d -m 0755 /home/sysroot
chown user.user /home/sysroot
echo "I: link /opt/sysroot to sysroot directory"
ln -sf ../home/sysroot /opt/sysroot
shopt -u
#!/bin/bash
#!/bin/sh
set -e
shopt -s dotglob
echo "I: create user"
adduser --gecos User --disabled-login user
echo "I: set user password"
echo "user:user" | chpasswd
shopt -u
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment