Remove bash profile during installation script
This commit is contained in:
parent
2e087298a3
commit
71a301ff0f
1 changed files with 26 additions and 17 deletions
|
@ -77,25 +77,34 @@ function runSetup
|
||||||
and runHook --force autologin "Please set up a function `autologin` for setting up autologin for the `root` user"
|
and runHook --force autologin "Please set up a function `autologin` for setting up autologin for the `root` user"
|
||||||
|
|
||||||
and begin
|
and begin
|
||||||
set -l script (string escape (getCloneFile (getInstallerScript)))
|
set -l profile "/root/.bash_profile"
|
||||||
|
|
||||||
wrapScript (
|
begin
|
||||||
string join " " \
|
set -l profile (string escape "$profile")
|
||||||
(begin
|
set -l tmp (string escape "$profile""_")
|
||||||
for var in \
|
set -l script (string escape (getCloneFile (getInstallerScript)))
|
||||||
CONFIG_NAME \
|
|
||||||
VALHALLA_BACKUP_DISABLED \
|
|
||||||
VALHALLA_BACKUP_DIR \
|
|
||||||
VALHALLA_BACKUP_SERVER \
|
|
||||||
VALHALLA_BACKUP_SERVER_PORT \
|
|
||||||
VALHALLA_BACKUP_SERVER_USER \
|
|
||||||
VALHALLA_BACKUP_SERVER_KEY
|
|
||||||
echo "$var=$(string escape "$$var")"
|
|
||||||
end
|
|
||||||
end) \
|
|
||||||
(string escape $script))
|
|
||||||
|
|
||||||
end | runChroot "$mountDir" tee /root/.bash_profile >/dev/null
|
printf "%s\n" \
|
||||||
|
"mv $profile $tmp" \
|
||||||
|
(wrapScript (
|
||||||
|
string join " " \
|
||||||
|
(begin
|
||||||
|
for var in \
|
||||||
|
CONFIG_NAME \
|
||||||
|
VALHALLA_BACKUP_DISABLED \
|
||||||
|
VALHALLA_BACKUP_DIR \
|
||||||
|
VALHALLA_BACKUP_SERVER \
|
||||||
|
VALHALLA_BACKUP_SERVER_PORT \
|
||||||
|
VALHALLA_BACKUP_SERVER_USER \
|
||||||
|
VALHALLA_BACKUP_SERVER_KEY
|
||||||
|
echo "$var=$(string escape "$$var")"
|
||||||
|
end
|
||||||
|
end) \
|
||||||
|
(string escape $script) "&&")) \
|
||||||
|
"rm $tmp ||"
|
||||||
|
"mv $tmp $profile"
|
||||||
|
end | runChroot "$mountDir" tee "$profile" >/dev/null
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function actionPostRun
|
function actionPostRun
|
||||||
|
|
Loading…
Reference in a new issue