Content of script in /etc/init.d/ deleted on restart/etc/init.d/script, or /etc/inittab - respawn on dieHow...
Demod as a neologism
I run daily 5kms but I cant seem to improve stamina when playing soccer
Interaction between casting spells and the Attack action
Is is possible to externally power my DSLR with the original battery that is connected to the DSLR by means of wires?
Can we not simply connect a battery to a RAM to prevent data loss during power cuts?
Where is the circle of fifths mentioned for the first time?
How will the crew exit Starship when it lands on Mars?
How does Data know about his off switch?
Code Golf Measurer © 2019
Vergil Book XII, Line 756 | Meter Question
Does obfuscation give any measurable security benefit?
Does Darwin owe a debt to Hegel?
What are the branches of statistics?
Is the tap water in France safe to drink?
Does the US require a House vote to begin an impeachment inquiry?
Are there 99 percentiles, or 100 percentiles? And are they groups of numbers, or dividers or pointers to individual numbers?
Idiom for a situation or event that makes one poor or even poorer?
How to figure out key from key signature?
How (and if) to include name change for transgender person in genealogy?
Does any politician honestly want a No Deal Brexit?
Digit Date Range
I am often given, occasionally stolen, rarely sold, and never borrowed
Should I avoid "big words" when writing to a younger audience?
Trade a bishop in the opening
Content of script in /etc/init.d/ deleted on restart
/etc/init.d/script, or /etc/inittab - respawn on dieHow to restore the /etc/init.d/pure-ftpd-mysql?Minimal Linux with kernel and BusyBox: /etc/inittab is ignored, only /init is executedHow does systemd use /etc/init.d scripts?Is /etc/init.d hard-linked on CentOS?How to write access to default /etc/init.dPorting init.d script to systemdWhither /etc/init.d/skeleton?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}
I created a script in /etc/init.d called hello that does some bash commands. Sometimes when I restart the linux device (remove then reinstate power), the contents of my script get totally erased although the actual file is still there. There is another script in there called nginx that came with the system and doesn't have this problem.
I am running a Emlid RTK gps that has a linux computer built in.
sysvinit
add a comment
|
I created a script in /etc/init.d called hello that does some bash commands. Sometimes when I restart the linux device (remove then reinstate power), the contents of my script get totally erased although the actual file is still there. There is another script in there called nginx that came with the system and doesn't have this problem.
I am running a Emlid RTK gps that has a linux computer built in.
sysvinit
add a comment
|
I created a script in /etc/init.d called hello that does some bash commands. Sometimes when I restart the linux device (remove then reinstate power), the contents of my script get totally erased although the actual file is still there. There is another script in there called nginx that came with the system and doesn't have this problem.
I am running a Emlid RTK gps that has a linux computer built in.
sysvinit
I created a script in /etc/init.d called hello that does some bash commands. Sometimes when I restart the linux device (remove then reinstate power), the contents of my script get totally erased although the actual file is still there. There is another script in there called nginx that came with the system and doesn't have this problem.
I am running a Emlid RTK gps that has a linux computer built in.
sysvinit
sysvinit
asked Jan 13 '18 at 2:21
bakalolobakalolo
1236 bronze badges
1236 bronze badges
add a comment
|
add a comment
|
2 Answers
2
active
oldest
votes
You should not turn off the device taking off the power cord/battery; hence losing the contents of recently written files.
Try to use the official procedures to shut it down - power bottom or option in the menu; in the long term the device will be more stable.
Also if you have got the sync command, use it after writing your file.
Is that the cause of the file going blank though?
– bakalolo
Jan 16 '18 at 22:00
Most probably yes.
– Rui F Ribeiro
Jan 16 '18 at 22:06
You have got to run something before shutdown.synchas been the standard for decades now. Have you got it?
– Rui F Ribeiro
Jan 16 '18 at 22:13
Can't say I will get access to the device to run anything before power off can I make a script that runs sync when it starts up or periodically while power is on?
– bakalolo
Jan 16 '18 at 22:19
You can runsyncmanually after creating the script in init.d if you have the command. I do know neither the implementation nor the device to be of further help.
– Rui F Ribeiro
Jan 16 '18 at 22:21
|
show 1 more comment
This is speculation, as I don't know anything about this product.
It's possible the entire filesystem has been overwritten.
In many embedded systems the running filesystem lives in RAM, and is populated from a compressed image in flash (or similar) during a cold boot.
Alternately a software update may have occurred, which involved replacing the filesystem with a downloaded image.
On such systems, user settings tend to be stored on a separate filesystem.
add a comment
|
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f416727%2fcontent-of-script-in-etc-init-d-deleted-on-restart%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You should not turn off the device taking off the power cord/battery; hence losing the contents of recently written files.
Try to use the official procedures to shut it down - power bottom or option in the menu; in the long term the device will be more stable.
Also if you have got the sync command, use it after writing your file.
Is that the cause of the file going blank though?
– bakalolo
Jan 16 '18 at 22:00
Most probably yes.
– Rui F Ribeiro
Jan 16 '18 at 22:06
You have got to run something before shutdown.synchas been the standard for decades now. Have you got it?
– Rui F Ribeiro
Jan 16 '18 at 22:13
Can't say I will get access to the device to run anything before power off can I make a script that runs sync when it starts up or periodically while power is on?
– bakalolo
Jan 16 '18 at 22:19
You can runsyncmanually after creating the script in init.d if you have the command. I do know neither the implementation nor the device to be of further help.
– Rui F Ribeiro
Jan 16 '18 at 22:21
|
show 1 more comment
You should not turn off the device taking off the power cord/battery; hence losing the contents of recently written files.
Try to use the official procedures to shut it down - power bottom or option in the menu; in the long term the device will be more stable.
Also if you have got the sync command, use it after writing your file.
Is that the cause of the file going blank though?
– bakalolo
Jan 16 '18 at 22:00
Most probably yes.
– Rui F Ribeiro
Jan 16 '18 at 22:06
You have got to run something before shutdown.synchas been the standard for decades now. Have you got it?
– Rui F Ribeiro
Jan 16 '18 at 22:13
Can't say I will get access to the device to run anything before power off can I make a script that runs sync when it starts up or periodically while power is on?
– bakalolo
Jan 16 '18 at 22:19
You can runsyncmanually after creating the script in init.d if you have the command. I do know neither the implementation nor the device to be of further help.
– Rui F Ribeiro
Jan 16 '18 at 22:21
|
show 1 more comment
You should not turn off the device taking off the power cord/battery; hence losing the contents of recently written files.
Try to use the official procedures to shut it down - power bottom or option in the menu; in the long term the device will be more stable.
Also if you have got the sync command, use it after writing your file.
You should not turn off the device taking off the power cord/battery; hence losing the contents of recently written files.
Try to use the official procedures to shut it down - power bottom or option in the menu; in the long term the device will be more stable.
Also if you have got the sync command, use it after writing your file.
answered Jan 13 '18 at 12:29
Rui F RibeiroRui F Ribeiro
41.8k16 gold badges97 silver badges158 bronze badges
41.8k16 gold badges97 silver badges158 bronze badges
Is that the cause of the file going blank though?
– bakalolo
Jan 16 '18 at 22:00
Most probably yes.
– Rui F Ribeiro
Jan 16 '18 at 22:06
You have got to run something before shutdown.synchas been the standard for decades now. Have you got it?
– Rui F Ribeiro
Jan 16 '18 at 22:13
Can't say I will get access to the device to run anything before power off can I make a script that runs sync when it starts up or periodically while power is on?
– bakalolo
Jan 16 '18 at 22:19
You can runsyncmanually after creating the script in init.d if you have the command. I do know neither the implementation nor the device to be of further help.
– Rui F Ribeiro
Jan 16 '18 at 22:21
|
show 1 more comment
Is that the cause of the file going blank though?
– bakalolo
Jan 16 '18 at 22:00
Most probably yes.
– Rui F Ribeiro
Jan 16 '18 at 22:06
You have got to run something before shutdown.synchas been the standard for decades now. Have you got it?
– Rui F Ribeiro
Jan 16 '18 at 22:13
Can't say I will get access to the device to run anything before power off can I make a script that runs sync when it starts up or periodically while power is on?
– bakalolo
Jan 16 '18 at 22:19
You can runsyncmanually after creating the script in init.d if you have the command. I do know neither the implementation nor the device to be of further help.
– Rui F Ribeiro
Jan 16 '18 at 22:21
Is that the cause of the file going blank though?
– bakalolo
Jan 16 '18 at 22:00
Is that the cause of the file going blank though?
– bakalolo
Jan 16 '18 at 22:00
Most probably yes.
– Rui F Ribeiro
Jan 16 '18 at 22:06
Most probably yes.
– Rui F Ribeiro
Jan 16 '18 at 22:06
You have got to run something before shutdown.
sync has been the standard for decades now. Have you got it?– Rui F Ribeiro
Jan 16 '18 at 22:13
You have got to run something before shutdown.
sync has been the standard for decades now. Have you got it?– Rui F Ribeiro
Jan 16 '18 at 22:13
Can't say I will get access to the device to run anything before power off can I make a script that runs sync when it starts up or periodically while power is on?
– bakalolo
Jan 16 '18 at 22:19
Can't say I will get access to the device to run anything before power off can I make a script that runs sync when it starts up or periodically while power is on?
– bakalolo
Jan 16 '18 at 22:19
You can run
sync manually after creating the script in init.d if you have the command. I do know neither the implementation nor the device to be of further help.– Rui F Ribeiro
Jan 16 '18 at 22:21
You can run
sync manually after creating the script in init.d if you have the command. I do know neither the implementation nor the device to be of further help.– Rui F Ribeiro
Jan 16 '18 at 22:21
|
show 1 more comment
This is speculation, as I don't know anything about this product.
It's possible the entire filesystem has been overwritten.
In many embedded systems the running filesystem lives in RAM, and is populated from a compressed image in flash (or similar) during a cold boot.
Alternately a software update may have occurred, which involved replacing the filesystem with a downloaded image.
On such systems, user settings tend to be stored on a separate filesystem.
add a comment
|
This is speculation, as I don't know anything about this product.
It's possible the entire filesystem has been overwritten.
In many embedded systems the running filesystem lives in RAM, and is populated from a compressed image in flash (or similar) during a cold boot.
Alternately a software update may have occurred, which involved replacing the filesystem with a downloaded image.
On such systems, user settings tend to be stored on a separate filesystem.
add a comment
|
This is speculation, as I don't know anything about this product.
It's possible the entire filesystem has been overwritten.
In many embedded systems the running filesystem lives in RAM, and is populated from a compressed image in flash (or similar) during a cold boot.
Alternately a software update may have occurred, which involved replacing the filesystem with a downloaded image.
On such systems, user settings tend to be stored on a separate filesystem.
This is speculation, as I don't know anything about this product.
It's possible the entire filesystem has been overwritten.
In many embedded systems the running filesystem lives in RAM, and is populated from a compressed image in flash (or similar) during a cold boot.
Alternately a software update may have occurred, which involved replacing the filesystem with a downloaded image.
On such systems, user settings tend to be stored on a separate filesystem.
answered 1 hour ago
GrumpGrump
1701 silver badge7 bronze badges
1701 silver badge7 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f416727%2fcontent-of-script-in-etc-init-d-deleted-on-restart%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown