Skip to content

Commit

Permalink
continue if raspi-config removal fails
Browse files Browse the repository at this point in the history
Signed-off-by: openhabian <openhabian@openHABian>
  • Loading branch information
openhabian authored and openhabian committed Aug 16, 2024
1 parent 6814522 commit 7c4fec6
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions functions/system.bash
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,9 @@ bashrc_copy() {
if ! cp "${BASEDIR:-/opt/openhabian}"/includes/generic/bash.bashrc /etc/bash.bashrc; then echo "FAILED (user bashrc)"; return 1; fi
if ! cp "${BASEDIR:-/opt/openhabian}"/includes/generic/bashrc-root /root/.bashrc; then echo "FAILED (root bashrc)"; return 1; fi
if ! cp "${BASEDIR:-/opt/openhabian}"/includes/generic/bash_profile /home/"${username:-openhabian}"/.bash_profile; then echo "FAILED (user bash_profile)"; return 1; fi
<<<<<<< HEAD
if ! cp "${BASEDIR:-/opt/openhabian}"/includes/generic/bash_aliases /home/"${username:-openhabian}"/.bash_aliases; then echo "FAILED (user bash_aliases)"; return 1; fi
if chown "${username:-openhabian}:${username:-openhabian}" /home/"${username:-openhabian}"/.bash_*; then echo "OK"; else echo "FAILED (permissions)"; return 1; fi
if ! cp "${BASEDIR:-/opt/openhabian}"/includes/generic/bash_aliases /root/.bash_aliases; then echo "FAILED (root bash_aliases)"; return 1; fi
=======
if chown "${username:-openhabian}:${username:-openhabian}" /home/"${username:-openhabian}"/.bash_profile; then echo "OK"; else echo "FAILED (permissions)"; return 1; fi
>>>>>>> e2424568c (Clean up and organize repository files)
}

## Function for adding a tuned vim configuration file to the current system.
Expand Down Expand Up @@ -256,11 +252,7 @@ create_mount() {
srv_bind_mounts() {
if [[ -f /etc/ztab ]] && [[ $(systemctl is-active zram-config.service) == "active" ]]; then
echo -n "$(timestamp) [openHABian] Stopping zram service... "
<<<<<<< HEAD
if cond_redirect systemctl stop zram-config.service; then echo "OK"; else echo "FAILED"; return 1; fi
=======
if cond_redirect zram-config "stop"; then echo "OK"; else echo "FAILED"; return 1; fi
>>>>>>> febbbeb5d (Update all documentation for clarity and accuracy (#1443))
fi

echo -n "$(timestamp) [openHABian] Preparing openHAB folder mounts under '/srv/openhab-*'... "
Expand Down Expand Up @@ -336,7 +328,6 @@ permissions_corrections() {
if mosquitto_is_installed; then
if ! cond_redirect fix_permissions /etc/mosquitto/passwd "mosquitto:${username:-openhabian}" 640 750; then echo "FAILED (mosquitto passwd permissions)"; retval=1; fi
if ! cond_redirect fix_permissions /var/log/mosquitto "mosquitto:${username:-openhabian}" 644 755; then echo "FAILED (mosquitto log permissions)"; retval=1; fi
<<<<<<< HEAD
fi
if zigbee2mqtt_is_installed; then
if ! cond_redirect fix_permissions /var/log/zigbee2mqtt "${username:-openhabian}:openhab" 644 755; then echo "FAILED (zigbee2mqtt log permissions)"; retval=1; fi
Expand All @@ -356,23 +347,6 @@ permissions_corrections() {
if ! cond_redirect fix_permissions /opt/zram/persistence.bind "openhab:${username:-openhabian}" 664 775; then echo "FAILED (persistence on zram)"; retval=1; fi
fi
echo "OK"
=======
if ! cond_redirect fix_permissions /opt/zram/log.bind/mosquitto "mosquitto:${username:-openhabian}" 644 755; then echo "FAILED (mosquitto log permissions on zram)"; retval=1; fi
fi
if ! cond_redirect setfacl --recursive --remove-all "${openhabFolders[@]}"; then echo "FAILED (reset file access lists)"; retval=1; fi
# not sure if still needed. Let's see if removing this causes any user issues
#if ! cond_redirect setfacl -R -m g::rwX "${openhabFolders[@]}"; then echo "FAILED (set file access)"; retval=1; fi
#if ! cond_redirect setfacl -R -m d:g::rwX "${openhabFolders[@]}"; then echo "FAILED"; retval=1; fi

if cond_redirect fix_permissions /var/log/unattended-upgrades root:root 644 755; then echo "OK"; else echo "FAILED (unattended upgrades logdir)"; retval=1; fi
if cond_redirect fix_permissions /var/log/samba root:root 640 750; then echo "OK"; else echo "FAILED (samba logdir)"; retval=1; fi
if cond_redirect fix_permissions /opt/zram/log.bind/samba root:root 640 750; then echo "OK"; else echo "FAILED (samba logdir on zram)"; retval=1; fi

if cond_redirect fix_permissions /opt/zram/persistence.bind "openhab:${username:-openhabian}" 664 775; then echo "OK"; else echo "FAILED (persistence)"; retval=1; fi

if cond_redirect fix_permissions /var/log/openhab "openhab:${username:-openhabian}" 664 775; then echo "OK"; else echo "FAILED (openhab log)"; retval=1; fi
if cond_redirect fix_permissions /opt/zram/log.bind/openhab "openhab:${username:-openhabian}" 664 775; then echo "OK"; else echo "FAILED (openhab log on zram)"; retval=1; fi
>>>>>>> febbbeb5d (Update all documentation for clarity and accuracy (#1443))

if homegear_is_installed; then
echo -n "$(timestamp) [openHABian] Applying additional file permissions recommendations for Homegear... "
Expand Down

0 comments on commit 7c4fec6

Please sign in to comment.